I wrote a code unit but I wonder whether my code overrides 3rd Vendor or standards event code
Or my code will works independently ?
[EventSubscriber(ObjectType::Table, database::/Vendor Ledger Entry/, 'OnAfterCopyVendLedgerEntryFromGenJnlLine', '', true, true)]
procedure TLC_InsertVendLed(VAR VendorLedgerEntry: Record /Vendor Ledger Entry/; GenJournalLine: Record /Gen. Journal Line/)
var
begin
IF GenJournalLine./TLC Employee Code/ <> '' THEN
VendorLedgerEntry./TLC Employee Code/ := GenJournalLine./TLC Employee Code/;
end;
[EventSubscriber(ObjectType::Table, Database::/Vendor Ledger Entry/, 'OnAfterCopyVendLedgerEntryFromCVLedgEntryBuffer', '', true, true)]
local procedure TLC_OnAfterCopyVendLedgerEntryFromCVLedgEntryBuffer(var VendorLedgerEntry: Record /Vendor Ledger Entry/; CVLedgerEntryBuffer: Record /CV Ledger Entry Buffer/)
begin
if CVLedgerEntryBuffer./TLC Employee Code/ <> '' then
VendorLedgerEntry./TLC Employee Code/ := CVLedgerEntryBuffer./TLC Employee Code/;
end;
[EventSubscriber(ObjectType::Table, Database::/Vendor Ledger Entry/, 'OnAfterCopyVendLedgerEntryFromGenJnlLine', '', true, true)]
local procedure TLC_OnAfterCopyVendLedgerEntryFromGenJnlLine(var VendorLedgerEntry: Record /Vendor Ledger Entry/; GenJournalLine: Record /Gen. Journal Line/)
begin
if GenJournalLine./TLC Employee Code/ <> '' then
VendorLedgerEntry./TLC Employee Code/ := GenJournalLine./TLC Employee Code/;
end;