Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

Copying an IJL field to a new ILE?

(0) ShareShare
ReportReport
Posted on by 289

So using BC 365 19.5 on-prem here. I have created a couple of AL table extensions. For a specific custom field. One adds the field to the Item Journal Line table, the other adds the field to the Item Ledger Entry table. My goal is to take the defined value in the IJL and push it into the new ILE record. Code snippet below.

    [EventSubscriber(ObjectType::Codeunit, Codeunit::"Item Jnl.-Post Line", 'OnBeforeInsertItemLedgEntry', '', true, true)]
    local procedure CopyIjeVendorUuid(var ItemLedgerEntry: Record "Item Ledger Entry"; ItemJournalLine: Record "Item Journal Line")
    begin
        ItemLedgerEntry."Vendor UUID" := ItemJournalLine."Vendor UUID";
    end;
  

I've run across similar exercises detailed online, but the custom field value doesn't appear as expected in the Item Ledger Entry. Any suggestions?

  • Suggested answer
    Marco Mels Profile Picture
    on at
    RE: Copying an IJL field to a new ILE?

    Understood, thanks!

  • Suggested answer
    Greg Kujawa Profile Picture
    289 on at
    RE: Copying an IJL field to a new ILE?

    Disregard. I needed to revisit my other code portions that affect the IJL entries. All good.

  • Greg Kujawa Profile Picture
    289 on at
    RE: Copying an IJL field to a new ILE?

    I also tried subscribing to this event. Still no luck.

        [EventSubscriber(ObjectType::Codeunit, Codeunit::"Item Jnl.-Post Line", 'OnAfterInitItemLedgEntry', '', true, true)]
        local procedure CopyIjeVendorUuid(var ItemLedgerEntry: Record "Item Ledger Entry"; ItemJournalLine: Record "Item Journal Line")
        begin
            ItemLedgerEntry."Vendor UUID" := ItemJournalLine."Vendor UUID";
        end;

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,916 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,782 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans