web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

development

(0) ShareShare
ReportReport
Posted on by 10

i added a field in item journal & Item ledger entries. but it is not holding the values when posted. here is the code

pageextension 50220 SellingPrice extends "Item Journal"
{
layout
{

 addafter("Unit Cost")
{
field("Selling Price"; "Selling Price")
{

ApplicationArea = Basic, Suite;
}

}
}
}
pageextension 50221 SellingPrice1 extends "Item Ledger Entries"
{
layout
{

addafter("Open")
{
field("Selling Price"; "Selling Price")
{
ApplicationArea = Basic, Suite;

}

}
}
}

tableextension 50220 SellingPrice extends "Item Journal Line"
{
fields
{
field(50100; "Selling Price"; Decimal)
{

}
}

}
tableextension 50221 SellingPrice1 extends "Item Ledger Entry"
{
fields

  • Suggested answer
    JAngle Profile Picture
    161 on at

    An event subscriber is probably needed to populate the field with a codeunit. Current implementation assumes that the TRANSFERFIELDS function takes care of things - which it doesn’t appear to

  • Suggested answer
    RockwithNav Profile Picture
    9,229 Super User 2026 Season 2 on at

    Use the proper Event Subscriber.

  • burn19 Profile Picture
    10 on at

    Thank you . Can you guide me on how to do that?

  • Suggested answer
    JAngle Profile Picture
    161 on at
  • burn19 Profile Picture
    10 on at

    Tnx for the help.

    i added

    codeunit 50100 MyEventSubscriber

    {

         [EventSubscriber(ObjectType::Codeunit, Codeunit::"Item Jnl.-Post Line", 'OnBeforeInsertItemLedgEntry', '', false, false)]

         local procedure OnBeforeInsertItemLedgEntry(var ItemLedgerEntry: Record "Item Ledger Entry"; ItemJournalLine: Record "Item Journal Line"; TransferItem: Boolean; OldItemLedgEntry: Record "Item Ledger Entry");

         begin

             ItemLedgerEntry."Selling Price" := ItemJournalLine."Selling Price";

         end;

    }

    after adding the page and table extension.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 664 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 446 Super User 2026 Season 2

#3
Teagen Boll Profile Picture

Teagen Boll 282 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans