KVSKBASalesLine#
Events#
OnBeforeOnAfterValidateNoT37(Record Sales Line, Record Sales Line, Integer, Boolean) :#
Summary: Integration event raised before processing the No. field validation on a sales line.
[IntegrationEvent(false, false)]
local procedure OnBeforeOnAfterValidateNoT37(var Rec: Record "Sales Line"; var xRec: Record "Sales Line"; CurrFieldNo: Integer; var Handled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBASalesLine", 'OnBeforeOnAfterValidateNoT37', '', false, false)]
local procedure DoSomethingOnBeforeOnAfterValidateNoT37(var Rec: Record "Sales Line"; var xRec: Record "Sales Line"; CurrFieldNo: Integer; var Handled: Boolean)
begin
end;
Parameters:
Rec: The sales line being validatedxRec: The previous version of the sales lineCurrFieldNo: The field number that triggered the validationHandled: Set to true to skip default No. field processing
Remarks: This event is triggered in the OnAfterValidateNo event subscriber before performing KUMAVISION-specific No. field processing. Subscribe to this event to replace or extend the No. validation logic, skip specific processing steps, or add custom validations. Set Handled to true to prevent standard processing. The default logic calculates values, copies added tables (document texts, notes), and updates flowfields. Useful for implementing custom item/resource selection rules or integrating with external systems.
OnBeforeOnAfterValidateUnitCostLCYT37(Record Sales Line, Record Sales Line, Integer, Boolean) :#
Summary: Integration event raised before processing Unit Cost (LCY) field validation on a sales line.
[IntegrationEvent(false, false)]
local procedure OnBeforeOnAfterValidateUnitCostLCYT37(var Rec: Record "Sales Line"; var xRec: Record "Sales Line"; CurrFieldNo: Integer; var Handled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBASalesLine", 'OnBeforeOnAfterValidateUnitCostLCYT37', '', false, false)]
local procedure DoSomethingOnBeforeOnAfterValidateUnitCostLCYT37(var Rec: Record "Sales Line"; var xRec: Record "Sales Line"; CurrFieldNo: Integer; var Handled: Boolean)
begin
end;
Parameters:
Rec: The sales line being validatedxRec: The previous version of the sales lineCurrFieldNo: The field number that triggered the validationHandled: Set to true to skip default Unit Cost (LCY) processing
Remarks: This event is triggered in the OnAfterValidateUnitCostLCY event subscriber before recalculating the profit percentage. Subscribe to this event to replace or extend Unit Cost (LCY) validation logic, skip profit calculations, or add custom cost validations. Set Handled to true to prevent standard processing. The default logic recalculates the Profit % field based on the new unit cost. Useful for implementing custom profit margin rules or integrating with cost management systems.
OnBeforeOnAfterUpdateAmountsDoneT37(Record Sales Line, Record Sales Line, Integer, Boolean) :#
Summary: Integration event raised before updating outstanding amounts after amount calculations.
[IntegrationEvent(false, false)]
local procedure OnBeforeOnAfterUpdateAmountsDoneT37(var SalesLine: Record "Sales Line"; var xSalesLine: Record "Sales Line"; CurrFieldNo: Integer; var Handled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBASalesLine", 'OnBeforeOnAfterUpdateAmountsDoneT37', '', false, false)]
local procedure DoSomethingOnBeforeOnAfterUpdateAmountsDoneT37(var SalesLine: Record "Sales Line"; var xSalesLine: Record "Sales Line"; CurrFieldNo: Integer; var Handled: Boolean)
begin
end;
Parameters:
SalesLine: The sales line with updated amountsxSalesLine: The previous version of the sales lineCurrFieldNo: The field number that triggered the updateHandled: Set to true to skip default outstanding amount updates
Remarks: This event is triggered after amount fields have been recalculated but before updating outstanding order and shipped amounts. Subscribe to this event to replace or extend the outstanding amount update logic, skip specific updates, or add custom amount calculations. Set Handled to true to prevent standard processing. The default logic updates order backlog, amount net LCY, and other tracking fields. Useful for implementing custom backlog calculations or integrating with financial reporting systems.
OnBeforeOnAfterInitOutstandingAmount(Record Sales Line, Record Sales Header, Record Currency, Boolean) :#
Summary: Integration event raised before initializing outstanding amount fields on a sales line.
[IntegrationEvent(false, false)]
local procedure OnBeforeOnAfterInitOutstandingAmount(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; Currency: Record "Currency"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBASalesLine", 'OnBeforeOnAfterInitOutstandingAmount', '', false, false)]
local procedure DoSomethingOnBeforeOnAfterInitOutstandingAmount(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; Currency: Record "Currency"; var IsHandled: Boolean)
begin
end;
Parameters:
SalesLine: The sales line to initialize outstanding amounts forSalesHeader: The sales header providing document contextCurrency: The currency record for roundingIsHandled: Set to true to skip default outstanding amount initialization
Remarks: This event is triggered before calculating and initializing outstanding amount fields on sales lines. Subscribe to this event to replace or extend outstanding amount calculations, apply custom rounding rules, or skip default initialization. Set IsHandled to true to prevent standard processing. The default logic calculates outstanding quantities and amounts considering shipments and invoicing. Useful for implementing custom outstanding amount logic or integrating with project management systems.
OnBeforeInitOutstandingAmountNet(Record Sales Line, Record Sales Header, Boolean) :#
Summary: Integration event raised before initializing outstanding net amount fields on a sales line.
[IntegrationEvent(false, false)]
local procedure OnBeforeInitOutstandingAmountNet(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBASalesLine", 'OnBeforeInitOutstandingAmountNet', '', false, false)]
local procedure DoSomethingOnBeforeInitOutstandingAmountNet(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; var IsHandled: Boolean)
begin
end;
Parameters:
SalesLine: The sales line to initialize net amounts forSalesHeader: The sales header providing document contextIsHandled: Set to true to skip default net amount initialization
Remarks: This event is triggered before calculating KUMAVISION-specific net amount fields like Order Backlog LCY, Amount Net LCY, Invoiced Net LCY, and Shipped not Invoiced Net LCY. Subscribe to this event to replace or extend net amount calculations, apply custom currency conversions, or skip default initialization. Set IsHandled to true to prevent standard processing. The default logic calculates net amounts in LCY with proper currency conversion and rounding. Useful for implementing custom backlog reporting or integrating with financial planning systems.