Some of our customers are using Intercompany Posting. This is a useful tool but I have needed to make several changes to the code to make sure that the customer gets the functionality that is needed. For example we are using separate IC Partner codes for each Responsibility Center within a single company.
One thing though I would like Microsoft to fix in Codeunit 80. There the Intercompany Posting code is executed after a COMMIT. I suggest a small change.
IF NOT WhseRqst.ISEMPTY THEN
IF Invoice AND ("Bill-to IC Partner Code" <> ”) THEN
IF "Document Type" IN ["Document Type"::Order,"Document Type"::Invoice] THEN
IF NOT InvtPickPutaway THEN
// IF Invoice AND ("Bill-to IC Partner Code" <> ”) THEN
// IF "Document Type" IN ["Document Type"::Order,"Document Type"::Invoice] THEN
There is also another coding method in Codeunit 427 that I would like Microsoft to change.
CreateOutboxJnlTransaction(TempGenJnlLine : TEMPORARY Record "Gen. Journal Line";Rejection : Boolean) : Integer
ICPartner.GET(TempGenJnlLine."IC Partner Code");
IF ICPartner."Inbox Type" = ICPartner."Inbox Type"::"No IC Transfer" THEN
IF GLSetup."Last IC Transaction No." < 0 THEN
GLSetup."Last IC Transaction No." := 0;
ICTransactionNo := GLSetup."Last IC Transaction No." + 1;
GLSetup."Last IC Transaction No." := ICTransactionNo;
I don’t like to use the General Ledger Setup table to store the last transaction number.
2 Replies to “Intercompany Transaction from Sales Posting”
Thanks for posting it, this is really usefull but I would like to know that is the same code is for NAV 2013R2 also.
I have added a lot of changes to the Intercompany Posting in NAV 2013 R2. For example the ability to add a posted invoice to the outbox. In the companies that I use this functionality for only posted documents are used. Therefore I have enabled an IC Partner modification on Customers and Vendors if I only support posted documents. I have also created a web service and a web service client that enables me to send from one outbox to an inbox on the other end of a web service.
Also addes support for E-Invoices and created a mapping functionality for incoming invoices to make sure that purchase invoices are correctly created.