Error while posting Item Journal Line
zohaibu95@hotmail.com
Member Posts: 223
Dear all,
I am trying to post item journal line programatically using Codeunit 22 "Item Jnl.-Post Line". While posting i am facing this error.

My code is as under:
Any help will be appreciated.
I am trying to post item journal line programatically using Codeunit 22 "Item Jnl.-Post Line". While posting i am facing this error.

My code is as under:
ItemJournalLine.INIT;
ModifiedTime := FORMAT("Modified On");
Pos := STRPOS(ModifiedTime,' ');
ItemJournalLine."Document No." := Item."No." + ' ' + DELSTR(ModifiedTime, 1, Pos);
ItemJournalLine."Posting Date" := TODAY;
ItemJournalLine."Entry Type" := ItemJournalLine."Entry Type"::Purchase;
ItemJournalLine."Item No." := Item."No.";
ItemJournalLine.Quantity := Inventory;
ItemJournalLine."Quantity (Base)" := Inventory;
ItemJournalLine."Gen. Prod. Posting Group" := Item."Gen. Prod. Posting Group";
ItemJournalLine."Gen. Bus. Posting Group" := IntegrationSetup."Gen. Bus. Posting Group";
CODEUNIT.RUN(CODEUNIT::"Item Jnl.-Post Line",ItemJournalLine);
MODIFY;
COMMIT;
Any help will be appreciated.
Best Regards
Zohaib Ahmed
Dynamics NAV ERP Technical Consultant.
please like / agree / verify my answer, if it was helpful for you. thanks.
Zohaib Ahmed
Dynamics NAV ERP Technical Consultant.
please like / agree / verify my answer, if it was helpful for you. thanks.
0
Best Answer
-
There was a issue with a item also with the fiscal accounting period.Best Regards
Zohaib Ahmed
Dynamics NAV ERP Technical Consultant.
please like / agree / verify my answer, if it was helpful for you. thanks.5
Answers
-
There was a issue with a item also with the fiscal accounting period.Best Regards
Zohaib Ahmed
Dynamics NAV ERP Technical Consultant.
please like / agree / verify my answer, if it was helpful for you. thanks.5
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions