Table of Contents

KVSTRDItemSalesListingMgt

Summary: Provides Item Sales Listing Management operations such as customer has positive item listing and get checks to run.

Procedures

CustomerHasPositiveItemListing(Code[20], Date) : Boolean

Summary: Determines whether the customer has a positive item listing valid on the specified date.

procedure CustomerHasPositiveItemListing(CustomerNo: Code[20]; DateToCheck: Date): Boolean

Parameters:

  • CustomerNo: The customer number to check.
  • DateToCheck: The date to check the item listing against.

Returns: True if the customer has a positive item listing valid on the specified date; otherwise, false.

GetChecksToRun(Boolean, Boolean, Boolean) :

Summary: Returns the checks that were determined for the current sales document.

procedure GetChecksToRun(var CheckExclusiveSalesItems: Boolean; var CheckItemSalesListings: Boolean; var CheckProhibitedSalesCountries: Boolean): 

Parameters:

  • CheckExclusiveSalesItems: Indicates whether exclusive sales items should be checked.
  • CheckItemSalesListings: Indicates whether item sales listings should be checked.
  • CheckProhibitedSalesCountries: Indicates whether prohibited sales countries should be checked.

GetCustomerHierarchy(Code[20], Integer, Integer) :

Summary: Returns the loaded customer hierarchy and its listing information.

procedure GetCustomerHierarchy(var CustomerHierarchy: Code[20]; var NoOfCustomerLevels: Integer; var HighestCustomerLevelWithListing: Integer): 

Parameters:

  • CustomerHierarchy: The array to receive the customer hierarchy.
  • NoOfCustomerLevels: The number of customer levels in the hierarchy.
  • HighestCustomerLevelWithListing: The highest customer level that has a listing.

GetDateToCheck(Record Sales Header) : Date

Summary: Returns the date to use when checking item sales listings for the sales document.

procedure GetDateToCheck(SalesHeader: Record "Sales Header"): Date

Parameters:

  • SalesHeader: The sales header record for which to determine the check date.

Returns: The date to use when checking item sales listings for the sales document.

PrepareBeforeChecking(Record Sales Header) : Boolean

Summary: Prepares the item sales listing checks for the sales document.

procedure PrepareBeforeChecking(SalesHeader: Record "Sales Header"): Boolean

Parameters:

  • SalesHeader: The sales header record for which to prepare the item sales listing checks.

Returns: True if the checks were prepared successfully; otherwise, false.

Events

KVSTRDOnAfterDetermineWhichChecksToRun(Record Sales Header, Boolean, Boolean, Boolean) :

Summary: This event is raised after determining which checks to run based on the sales header. It allows for additional logic to be executed or modifications to the checks.

[IntegrationEvent(false, false)]
local procedure KVSTRDOnAfterDetermineWhichChecksToRun(SalesHeader: Record "Sales Header"; var AreExclusiveSalesItemsChecked: Boolean; var AreItemSalesListingsChecked: Boolean; var AreProhibitedSalesCountriesChecked: Boolean): 

Parameters:

  • SalesHeader: The sales header record that is being processed.
  • AreExclusiveSalesItemsChecked: Specifies if exclusive sales item record are available.
  • AreItemSalesListingsChecked: Specifies if item sales listings records are available.
  • AreProhibitedSalesCountriesChecked: Specifies if prohibited sales countries records are available.

KVSTRDOnBeforeGetCheckDate(Record Sales Header, Date, Boolean) :

Summary: This event is raised before determining the date to check for sales listings.

[IntegrationEvent(false, false)]
local procedure KVSTRDOnBeforeGetCheckDate(SalesHeader: Record "Sales Header"; var CheckDate: Date; var IsHandled: Boolean): 

Parameters:

  • SalesHeader: The Sales Header record that is being processed.
  • CheckDate: The date to check for sales listings.
  • isHandled: Specifies if the event has been handled. If set to true, the default logic will not be executed.

KVSTRDOnBeforeLoadCustHierarchy(Record Sales Header, Code[20], Integer, Integer, Boolean) :

Summary: This event is raised before loading the customer hierarchy for sales listings. It allows modifications or additional logic to be executed.

[IntegrationEvent(false, false)]
local procedure KVSTRDOnBeforeLoadCustHierarchy(SalesHeader: Record "Sales Header"; var CustNoInHierarchy: Code[20]; var NoOfCustLevels: Integer; var HighestCustLevelWithListing: Integer; var IsHandled: Boolean): 

Parameters:

  • SalesHeader: The Sales Header record that is being processed.
  • CustNoInHierarchy: An array of customer numbers in the hierarchy.
  • NoOfCustLevels: The number of customer levels in the hierarchy.
  • HighestCustLevelWithListing: The number of the highest customer level with a listing.
  • isHandled: Specifies if the event has been handled. If set to true, the default logic will not be executed.