Skip to content

KVSKBAComJnlPostBatch#

Procedures#

OnRun#

Summary: OnRun trigger that initiates the commission journal batch posting process. Copies the record, allows for custom handling via integration event, and executes the main posting logic.

procedure OnRun(Rec: Record "KVSKBACommissionJournalLine")

Events#

OnAfterCreateRecurringText(Record KVSKBACommissionJournalLine, Record Accounting Period, Integer, Integer, Integer, Text[30]) :#

Summary: Integration Event that is raised after creating recurring text patterns in commission journal lines. Use this event to customize or extend the recurring text creation logic.

[IntegrationEvent(false, false)]
local procedure OnAfterCreateRecurringText(var CommissionJournalLine: Record "KVSKBACommissionJournalLine"; var AccountingPeriod: Record "Accounting Period"; var Day: Integer; var Week: Integer; var Month: Integer; var MonthText: Text[30]): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAComJnlPostBatch", 'OnAfterCreateRecurringText', '', false, false)]
local procedure DoSomethingOnAfterCreateRecurringText(var CommissionJournalLine: Record "KVSKBACommissionJournalLine"; var AccountingPeriod: Record "Accounting Period"; var Day: Integer; var Week: Integer; var Month: Integer; var MonthText: Text[30])
begin
end;

Parameters:

  • CommissionJournalLine: The commission journal line that was processed for recurring text.
  • AccountingPeriod: The accounting period record used for text substitution.
  • Day: The day number extracted from the posting date.
  • Week: The week number extracted from the posting date.
  • Month: The month number extracted from the posting date.
  • MonthText: The month text extracted from the posting date.

Remarks: This event allows external extensions to perform additional text processing or modify the journal line after the standard recurring text creation has been completed.

OnBeforeCode(Record KVSKBACommissionJournalLine, Boolean) :#

Summary: Integration Event that is raised before the main posting code execution. Use this event to perform custom validation or modification logic before batch posting.

[IntegrationEvent(false, false)]
local procedure OnBeforeCode(var KVSKBACommissionJournalLine: Record "KVSKBACommissionJournalLine"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAComJnlPostBatch", 'OnBeforeCode', '', false, false)]
local procedure DoSomethingOnBeforeCode(var KVSKBACommissionJournalLine: Record "KVSKBACommissionJournalLine"; var IsHandled: Boolean)
begin
end;

Parameters:

  • KVSKBACommissionJournalLine: The commission journal line record being processed.
  • IsHandled: Set to true to skip the default batch posting logic.

Remarks: This event allows external extensions to customize the commission journal batch posting process or completely bypass the default behavior by setting IsHandled to true.