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...
Suggested Answer

Posting Item Charges to Production Output Customization

(1) ShareShare
ReportReport
Posted on by 32
Hi,
 
 
I want to do absorption costing to add some actual charges to production output using item charges.
 
Here is a sample of what i was trying to achieve however i get an error.
 
Has anyone customized item cahrges to post using journals?
 
var
                    ItemJnl: Record "Item Journal Line";
                    ItemJnlPostLine: Codeunit "Item Jnl.-Post Line";
                begin
                    ItemJnl.Init();
                    ItemJnl."Posting Date" := TODAY;
                    ItemJnl."Journal Template Name" := 'ITEM';
                    ItemJnl."Journal Batch Name" := 'DEFAULT';
                    ItemJnl."Document No." := 'Testing';
                    ItemJnl."External Document No." := 'test';
                    ItemJnl."Item No." := '1000';
                    ItemJnl.Validate("Item No.");
                    ItemJnl."Item Charge No." := 'JB-FREIGHT';
                    ItemJnl.Description := 'JB-FREIGHT';
                    ItemJnl."Document Line No." := 20000;
                    ItemJnl."Unit of Measure Code" := '';
                    ItemJnl.Quantity := 1;
                    ItemJnl."Qty. per Unit of Measure" := 1;
                    ItemJnl."Invoiced Quantity" := 1;
                    ItemJnl."Invoiced Qty. (Base)" := 1;
                    ItemJnl.Amount := 400;
                    ItemJnl."Unit Cost (ACY)" := 400;
                    ItemJnl."Unit Cost" := 400;
                    ItemJnl."Applies-to Entry" := 330;
                    ItemJnl."Gen. Prod. Posting Group" := 'SERVICES';
                    ItemJnl.Insert();
 
 
 
 
                    Message('Inserted');
 
                    //ItemJnlPostLine.RunWithCheck(ItemJnl);
 
                end;
 
The error
Error message: 
The Item Ledger Entry does not exist. Identification fields and values: Entry No.='0'

 
 
AL call stack: 
"Item Jnl.-Post Line"(CodeUnit 22).PostItem line 73 - Base Application by Microsoft
"Item Jnl.-Post Line"(CodeUnit 22).Code line 133 - Base Application by Microsoft
"Item Jnl.-Post Line"(CodeUnit 22).PostSplitJnlLine line 12 - Base Application by Microsoft
"Item Jnl.-Post Line"(CodeUnit 22).RunWithCheck line 16 - Base Application by Microsoft
"Item Jnl.-Post Batch"(CodeUnit 23).PostLines line 48 - Base Application by Microsoft
"Item Jnl.-Post Batch"(CodeUnit 23).Code line 56 - Base Application by Microsoft
"Item Jnl.-Post Batch"(CodeUnit 23).OnRun(Trigger) line 6 - Base Application by Microsoft
"Item Jnl.-Post"(CodeUnit 241).Code line 25 - Base Application by Microsoft
"Item Jnl.-Post"(CodeUnit 241).OnRun(Trigger) line 3 - Base Application by Microsoft
"Item Journal"(Page 40)."Post - OnAction"(Trigger) line 2 - Base Application by Microsoft
I have the same question (0)
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,801 Super User 2026 Season 1 on at
    Hi,
     
    Make sure that the the Item Ledger Entry table have a record where Entry No. = 330.
     
    Otherwise you can set 0 for Applies-to Entry.
     
     
    Best regards,
    Mohamed Amine MAHMOUDI
  • Suggested answer
    YUN ZHU Profile Picture
    99,084 Super User 2026 Season 1 on at
    Although there is an Item Charge No. field in the Item Journal, you cannot post from this page.
    It is recommended that you customize it in the Purchase Order
    If you just want to increase the item cost, you can use the item revaluation journal
     
    Hope this helps.
    Thanks.
    ZHU

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,946 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,177 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 555 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans