Table of Contents

KVSKBASaveSalesPriceLineDisc

Events

OnAfterValidateLineDiscountOnLineDiscountCreation(Record KVSKBASalesLineDiscount, Record Item, Record Customer, Record Customer Discount Group, Record Campaign, Boolean) :

OBSOLETE

This Element will be removed or changed with a future Version of the App.

Summary: Integration event raised in LineDiscountCreation after all standard fields of the sales line discount record have been validated.

[Obsolete('The price calculation needs a redesign due to the standard changes, possibly the function will not be available in the future.', '18.3')]
[IntegrationEvent(false, false)]
local procedure OnAfterValidateLineDiscountOnLineDiscountCreation(var KVSKBASalesLineDiscount: Record "KVSKBASalesLineDiscount"; Item: Record "Item"; Customer: Record "Customer"; CustomerDiscountGroup: Record "Customer Discount Group"; Campaign: Record "Campaign"; UpdateRec: Boolean): 

Parameters:

  • KVSKBASalesLineDiscount: The sales line discount record that has been prepared and is about to be inserted.
  • Item: The item record related to the current sales line being processed.
  • Customer: The customer record for the selected sales code (empty if sales type is not Customer).
  • CustomerDiscountGroup: The customer discount group record for the selected sales code (empty if sales type is not Customer Disc. Group).
  • Campaign: The campaign record for the selected sales code (empty if sales type is not Campaign).
  • UpdateRec: Indicates whether the record should be updated if a duplicate already exists.

Remarks: Subscribe to this event to set additional fields on the sales line discount record before it is inserted. Note: This event is obsolete and may be removed in a future version due to the redesign of the price calculation.

OnSalesPriceCreationOnBeforeSalesPriceTypeCaseElse(Record KVSKBASalesPrice, Record Sales Line) :

OBSOLETE

This Element will be removed or changed with a future Version of the App.

Summary: Integration event raised in SalesPriceCreation when the SalesPrice type does not match any of the handled cases (neither Item nor Item Price Group).

[Obsolete('The price calculation needs a redesign due to the standard changes, possibly the function will not be available in the future.', '18.3')]
[IntegrationEvent(false, false)]
local procedure OnSalesPriceCreationOnBeforeSalesPriceTypeCaseElse(var SalesPrice: Record "KVSKBASalesPrice"; var TempSalesLine: Record "Sales Line" temporary): 

Parameters:

  • SalesPrice: The sales price record being built for the current sales line.
  • TempSalesLine: The temporary sales line being processed.

Remarks: Subscribe to this event to handle custom or extended price types that are not covered by the standard case statement. Note: This event is obsolete and may be removed in a future version due to the redesign of the price calculation.

OnBeforeFindPricingCustomer(Record Sales Line, Code[20], Boolean) :

Summary: Integration event raised at the beginning of FindPricingCustomer, before the first sales line is used to determine the default pricing customer.

[IntegrationEvent(false, false)]
local procedure OnBeforeFindPricingCustomer(var TempSalesLine: Record "Sales Line" temporary; var PricingCustomerNo: Code[20]; var IsHandled: Boolean): 

Parameters:

  • TempSalesLine: The temporary sales lines buffer used to look up the pricing customer.
  • PricingCustomerNo: Return variable for the pricing customer number. Set this in the subscriber when handling the event.
  • IsHandled: Set to true to skip the standard logic and use the value set in PricingCustomerNo instead.

Remarks: Subscribe to this event to provide a custom default pricing customer when the standard determination based on the sales header's KVSKBAPricingCustomer field is not sufficient.

OnBeforeFindPricingCustomerwithSalesLine(Record Sales Line, Code[20], Boolean) :

Summary: Integration event raised at the beginning of FindPricingCustomerwithSalesLine, before the pricing customer is determined from the sales header.

[IntegrationEvent(false, false)]
local procedure OnBeforeFindPricingCustomerwithSalesLine(TempSalesLine: Record "Sales Line" temporary; var PricingCustomerNo: Code[20]; var IsHandled: Boolean): 

Parameters:

  • TempSalesLine: The temporary sales line from which the pricing customer is to be determined.
  • PricingCustomerNo: Return variable for the pricing customer number. Set this in the subscriber when handling the event.
  • IsHandled: Set to true to skip the standard vendor lookup logic and use the value set in PricingCustomerNo instead.

Remarks: Subscribe to this event to override how the pricing customer is resolved for a given sales line, for example when custom customer selection logic is required.