Skip to content

KVSPSASalesPost#

Events#

KVSPSAOnAfterFilterForSalesLineOnBeforeFillICInformation(Record Sales Line) :#

Summary: Event fired after filtering sales lines and before filling intercompany (IC) information. Allows extensions to modify sales lines before intercompany processing. This event enables custom modifications to sales lines after filtering has been applied but before intercompany information is populated during sales posting.

[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterFilterForSalesLineOnBeforeFillICInformation(var SalesLine: Record "Sales Line"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSASalesPost", 'KVSPSAOnAfterFilterForSalesLineOnBeforeFillICInformation', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterFilterForSalesLineOnBeforeFillICInformation(var SalesLine: Record "Sales Line")
begin
end;

Parameters:

  • SalesLine: The filtered sales line before intercompany information processing. Can be modified by extensions.

KVSPSAOnAfterFilterProjectBudgetLineBeforeFillICInformation(Record Sales Line, Record KVSPSA Job Budget Line) :#

Summary: Event fired after filtering project budget lines and before filling intercompany information. Allows extensions to modify budget lines before IC processing. This event enables custom modifications to job budget lines after filtering has been applied but before intercompany information is populated during sales posting.

[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterFilterProjectBudgetLineBeforeFillICInformation(SalesLine: Record "Sales Line"; var KVSPSAJobBudgetLine: Record "KVSPSA Job Budget Line"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSASalesPost", 'KVSPSAOnAfterFilterProjectBudgetLineBeforeFillICInformation', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterFilterProjectBudgetLineBeforeFillICInformation(SalesLine: Record "Sales Line"; var KVSPSAJobBudgetLine: Record "KVSPSA Job Budget Line")
begin
end;

Parameters:

  • SalesLine: The sales line providing context for the budget line processing.
  • KVSPSAJobBudgetLine: The filtered job budget line before intercompany processing. Can be modified by extensions.

KVSPSAOnAfterFilterWBSLineBeforeFillICInformation(Record Sales Line, Record KVSPSAJobPSPLine) :#

Summary: Event fired after filtering WBS (Work Breakdown Structure) lines and before filling intercompany information. Allows extensions to modify WBS lines before IC processing. This event enables custom modifications to job PSP (Project Structure Plan) lines after filtering but before intercompany information is populated during sales posting.

[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterFilterWBSLineBeforeFillICInformation(SalesLine: Record "Sales Line"; var KVSPSAJobPSPLine: Record "KVSPSAJobPSPLine"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSASalesPost", 'KVSPSAOnAfterFilterWBSLineBeforeFillICInformation', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterFilterWBSLineBeforeFillICInformation(SalesLine: Record "Sales Line"; var KVSPSAJobPSPLine: Record "KVSPSAJobPSPLine")
begin
end;

Parameters:

  • SalesLine: The sales line providing context for the WBS line processing.
  • KVSPSAJobPSPLine: The filtered job PSP line before intercompany processing. Can be modified by extensions.

KVSPSAOnBeforePostJobJnlForSalesLine(Record Sales Header, Record Sales Line, Code[20], Code[35], Boolean) :#

Summary: Event fired before posting job journal entries for a sales line. Allows extensions to customize or skip job journal posting for sales transactions. This event enables extensions to implement custom job posting logic or bypass standard job journal posting when specific business scenarios require alternative processing.

[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforePostJobJnlForSalesLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; DocNo: Code[20]; ExtDocNo: Code[35]; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSASalesPost", 'KVSPSAOnBeforePostJobJnlForSalesLine', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforePostJobJnlForSalesLine(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; DocNo: Code[20]; ExtDocNo: Code[35]; var IsHandled: Boolean)
begin
end;

Parameters:

  • SalesHeader: The sales header being posted.
  • SalesLine: The sales line for which job journal posting is about to be performed.
  • DocNo: The document number for the posted transaction.
  • ExtDocNo: The external document number for reference.
  • IsHandled: Set to true to skip the standard job journal posting process for this sales line.

KVSPSAOnBeforeRunCheckForJobJnlForSalesLine(Record Sales Line, Record Job Journal Line) :#

Summary: Event fired before running validation checks for job journal entries related to sales lines. Allows extensions to modify job journal lines before validation. This event enables custom modifications to job journal lines before they undergo standard validation checks during sales posting with job integration.

[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeRunCheckForJobJnlForSalesLine(SalesLine: Record "Sales Line"; var JobJournalLine: Record "Job Journal Line"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSASalesPost", 'KVSPSAOnBeforeRunCheckForJobJnlForSalesLine', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeRunCheckForJobJnlForSalesLine(SalesLine: Record "Sales Line"; var JobJournalLine: Record "Job Journal Line")
begin
end;

Parameters:

  • SalesLine: The sales line for which job journal validation is about to be performed.
  • JobJournalLine: The job journal line that will be validated. Can be modified by extensions.

KVSPSAOnBeforeTestFieldJobNoMandatoryByPosting(Record Sales Header, Record Sales Line, Record KVSPSAJobNoMandatoryByPosting, Boolean) :#

Summary: This event is raised before testing the field Job No. Mandatory By Posting. If IsHandled is set to true, the standard testing of the field is skipped.

[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeTestFieldJobNoMandatoryByPosting(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var JobNoMandatoryByPosting: Record "KVSPSAJobNoMandatoryByPosting"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSASalesPost", 'KVSPSAOnBeforeTestFieldJobNoMandatoryByPosting', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeTestFieldJobNoMandatoryByPosting(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var JobNoMandatoryByPosting: Record "KVSPSAJobNoMandatoryByPosting"; var IsHandled: Boolean)
begin
end;

Parameters:

  • SalesHeader:
  • SalesLine:
  • JobNoMandatoryByPosting:
  • IsHandled:

OnBeforeCheckJobBilltoCust(Record Job, Boolean) :#

Summary: Event fired before checking the Bill-to Customer No. on a Job record.

[IntegrationEvent(false, false)]
local procedure OnBeforeCheckJobBilltoCust(Job: Record "Job"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSASalesPost", 'OnBeforeCheckJobBilltoCust', '', false, false)]
local procedure DoSomethingOnBeforeCheckJobBilltoCust(Job: Record "Job"; var IsHandled: Boolean)
begin
end;

Parameters:

  • Job: The Job record being checked.
  • IsHandled: Indicates whether the event has been handled.

OnBeforeLoopForPostedCreditMemoInUpdateInvoiceLedgerEntry(Record KVSPSAInvoice Ledger Entry, Record Sales Cr.Memo Line, Boolean) :#

Summary: Event fired before processing each invoice ledger entry in the loop during posted credit memo update. Allows extensions to customize or skip the update of individual invoice ledger entries. This event enables custom logic to modify invoice ledger entry processing, implement custom validation, or bypass standard update logic for specific entries when posting credit memos.

[IntegrationEvent(false, false)]
local procedure OnBeforeLoopForPostedCreditMemoInUpdateInvoiceLedgerEntry(var InvoiceLedgerEntry: Record "KVSPSAInvoice Ledger Entry"; var SalesCrMemoLine: Record "Sales Cr.Memo Line"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSASalesPost", 'OnBeforeLoopForPostedCreditMemoInUpdateInvoiceLedgerEntry', '', false, false)]
local procedure DoSomethingOnBeforeLoopForPostedCreditMemoInUpdateInvoiceLedgerEntry(var InvoiceLedgerEntry: Record "KVSPSAInvoice Ledger Entry"; var SalesCrMemoLine: Record "Sales Cr.Memo Line"; var IsHandled: Boolean)
begin
end;

Parameters:

  • InvoiceLedgerEntry: The invoice ledger entry being processed in the loop (passed by reference for modification).
  • SalesCrMemoLine: The sales credit memo line being posted, providing context for the invoice ledger entry update.
  • IsHandled: Boolean flag to indicate if the event has been handled by an extension. Set to true to skip the standard update process for this invoice ledger entry and continue to the next iteration.