KVSKBAPackagingMaterialMgt#
Events#
OnAfterCreateNewPackagingMaterialEntries(Record KVSKBAPackagingMaterialAssign, Record KVSKBAPackagingMaterialEntry, Record Item Ledger Entry) :#
Summary: Integration event triggered after packaging material entries have been created.
[IntegrationEvent(false, false)]
local procedure OnAfterCreateNewPackagingMaterialEntries(PackagingMaterialAssign: Record "KVSKBAPackagingMaterialAssign"; var PackagingMaterialEntry: Record "KVSKBAPackagingMaterialEntry"; ItemLedgerEntry: Record "Item Ledger Entry"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAPackagingMaterialMgt", 'OnAfterCreateNewPackagingMaterialEntries', '', false, false)]
local procedure DoSomethingOnAfterCreateNewPackagingMaterialEntries(PackagingMaterialAssign: Record "KVSKBAPackagingMaterialAssign"; var PackagingMaterialEntry: Record "KVSKBAPackagingMaterialEntry"; ItemLedgerEntry: Record "Item Ledger Entry")
begin
end;
Parameters:
PackagingMaterialAssign: The last packaging material assignment that was processed.PackagingMaterialEntry: The last packaging material entry that was created (can be modified).ItemLedgerEntry: The item ledger entry that was used as the source.
Remarks: Use this event to perform additional processing after packaging material entries are created. Subscribe to this event for logging, notifications, or creating related records. Note that this is called after all entries from the loop have been created.
OnBeforeInsertCreateNewPackagingMaterialEntries(Record KVSKBAPackagingMaterialAssign, Record KVSKBAPackagingMaterialEntry, Record Item Ledger Entry) :#
Summary: Integration event triggered before inserting a packaging material entry.
[IntegrationEvent(false, false)]
local procedure OnBeforeInsertCreateNewPackagingMaterialEntries(PackagingMaterialAssign: Record "KVSKBAPackagingMaterialAssign"; var PackagingMaterialEntry: Record "KVSKBAPackagingMaterialEntry"; ItemLedgerEntry: Record "Item Ledger Entry"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAPackagingMaterialMgt", 'OnBeforeInsertCreateNewPackagingMaterialEntries', '', false, false)]
local procedure DoSomethingOnBeforeInsertCreateNewPackagingMaterialEntries(PackagingMaterialAssign: Record "KVSKBAPackagingMaterialAssign"; var PackagingMaterialEntry: Record "KVSKBAPackagingMaterialEntry"; ItemLedgerEntry: Record "Item Ledger Entry")
begin
end;
Parameters:
PackagingMaterialAssign: The packaging material assignment being processed.PackagingMaterialEntry: The packaging material entry to be inserted (can be modified).ItemLedgerEntry: The source item ledger entry.
Remarks: Use this event to modify packaging material entry fields before insertion. Subscribe to add custom validations or set additional fields. This is called for each packaging material assignment found for the item.
OnHasFilterDeletePackagingMaterialEntry(Record KVSKBAPackagingMaterialEntry, Record Item Ledger Entry) :#
Summary: Integration event triggered to add additional filters before deleting packaging material entries.
[IntegrationEvent(false, false)]
local procedure OnHasFilterDeletePackagingMaterialEntry(var PackagingMaterialEntry: Record "KVSKBAPackagingMaterialEntry"; var ItemLedgerEntry: Record "Item Ledger Entry"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAPackagingMaterialMgt", 'OnHasFilterDeletePackagingMaterialEntry', '', false, false)]
local procedure DoSomethingOnHasFilterDeletePackagingMaterialEntry(var PackagingMaterialEntry: Record "KVSKBAPackagingMaterialEntry"; var ItemLedgerEntry: Record "Item Ledger Entry")
begin
end;
Parameters:
PackagingMaterialEntry: The packaging material entry record with filters applied (can be modified).ItemLedgerEntry: The item ledger entry record containing source filters.
Remarks: Use this event to add custom filters to the packaging material entry deletion. Subscribe to this event to implement additional filtering logic beyond the standard fields. The standard filters applied are: Item No., Variant Code, Posting Date, and Entry No.
OnBeforeCreateNewPackagingMaterialEntries(Record Item Ledger Entry, Boolean) :#
Summary: Integration event triggered before creating new packaging material entries.
[IntegrationEvent(false, false)]
local procedure OnBeforeCreateNewPackagingMaterialEntries(ItemLedgerEntry: Record "Item Ledger Entry"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAPackagingMaterialMgt", 'OnBeforeCreateNewPackagingMaterialEntries', '', false, false)]
local procedure DoSomethingOnBeforeCreateNewPackagingMaterialEntries(ItemLedgerEntry: Record "Item Ledger Entry"; var IsHandled: Boolean)
begin
end;
Parameters:
ItemLedgerEntry: The item ledger entry to create packaging material entries for.IsHandled: Set to true to skip the standard packaging material entry creation.
Remarks: Use this event to implement custom logic for packaging material entry creation. Set IsHandled to true to completely replace the standard creation logic. Subscribe to add custom validations or prerequisites before entry creation.
OnBeforeDeletePackagingMaterialEntry(Record Item Ledger Entry, Boolean) :#
Summary: Integration event triggered before deleting packaging material entries.
[IntegrationEvent(false, false)]
local procedure OnBeforeDeletePackagingMaterialEntry(var ItemLedgerEntry: Record "Item Ledger Entry"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAPackagingMaterialMgt", 'OnBeforeDeletePackagingMaterialEntry', '', false, false)]
local procedure DoSomethingOnBeforeDeletePackagingMaterialEntry(var ItemLedgerEntry: Record "Item Ledger Entry"; var IsHandled: Boolean)
begin
end;
Parameters:
ItemLedgerEntry: The item ledger entry record containing filters for deletion.IsHandled: Set to true to skip the standard packaging material entry deletion.
Remarks: Use this event to implement custom deletion logic for packaging material entries. Set IsHandled to true to completely replace the standard deletion logic. Subscribe to add custom validations or alternative deletion approaches.