Skip to content

KVSKBAServiceProFormaPrinted#

Procedures#

OnRun#

procedure OnRun(Rec: Record "#437dbf0e84ff417a965ded2bb9650972#Service Header")

SetSuppressCommit(Boolean) :#

Summary: This function sets the SuppressCommit variable to the value passed in. It is used to control whether the commit at the end of the OnRun trigger should be executed or not.

procedure SetSuppressCommit(NewSuppressCommit: Boolean): 

Parameters:

  • NewSuppressCommit: The new value for SuppressCommit.

Remarks: This procedure allows external code to set the SuppressCommit flag, which determines whether the final commit operation in the OnRun trigger is executed. By setting this flag to true, the commit can be suppressed, allowing for scenarios where changes should not be finalized immediately. This is useful in cases where additional processing or validation is required before committing changes to the database.

Events#

OnBeforeOnRun(Record Service Header, Boolean) :#

Summary: This event is raised before anything else is done in the OnRun trigger.

[IntegrationEvent(false, false)]
local procedure OnBeforeOnRun(var ServiceHeader: Record "Service Header"; var SuppressCommit: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAServiceProFormaPrinted", 'OnBeforeOnRun', '', false, false)]
local procedure DoSomethingOnBeforeOnRun(var ServiceHeader: Record "Service Header"; var SuppressCommit: Boolean)
begin
end;

Parameters:

  • ServiceHeader: The Service Header, where the field KVSKBANoPrintedProForma should be increased by 1.
  • SuppressCommit: Whether or not the Commit at the very end should be executed.

Remarks: This event allows external code to intervene before the OnRun trigger processes the Service Header. It provides an opportunity to modify the Service Header or control the commit behavior by setting SuppressCommit.

OnBeforeModify(Record Service Header) :#

Summary: This event is raised before the Service Header is modified.

[IntegrationEvent(false, false)]
local procedure OnBeforeModify(var ServiceHeader: Record "Service Header"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAServiceProFormaPrinted", 'OnBeforeModify', '', false, false)]
local procedure DoSomethingOnBeforeModify(var ServiceHeader: Record "Service Header")
begin
end;

Parameters:

  • ServiceHeader: The Service Header, where the field KVSKBANoPrintedProForma should be increased by 1 and is about to be modified.

Remarks: This event allows external code to intervene before the Service Header is modified in the OnRun trigger. It provides an opportunity to perform additional validations or modifications before the record is updated in the database.