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

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Answered

How to post invent transfer journal through x++ in d365 f&o

(0) ShareShare
ReportReport
Posted on by 4

Hello everyone,

I want to post transfer journal through x++.

but I tried some code but they didn't work for 365f&o

can anyone help me out.

Thanks 

siddy

I have the same question (0)
  • Verified answer
    Syed Zeeshan Haider Jafry Profile Picture
    725 on at
    RE: How to post invent transfer journal through x++ in d365 f&o

    Hi Siddy,

    You can try below code snippet.

    public static server void postJournal(InventJournalTable   _journalTable, boolean _deleteJournalIfErrors = true, boolean _showInfo = true)
        {
        
            JournalCheckPost        journalCheckPost;
            ;
        
            if(InventJournalCheckpost::newPostJournal(_journalTable).validate())
                    journalCheckPost = InventJournalCheckPost::newPostJournal(_journalTable);
        
            if (InventJournalTrans::lastLineNum(_journalTable.JournalId) == 0)
            {
                _journalTable.delete();
            }
            else
            {
                if(journalCheckPost.validate())
                {
                    try
                    {
                        if (!_showInfo)
                        {
                            journalCheckPost.parmThrowCheckFailed(false);
                            journalCheckPost.progressHide();
                            journalCheckPost.parmInBatch(true);
                            journalCheckPost.parmShowInfoResult(false);
                        }
                        journalCheckPost.run();
                    }
                    catch
                    {
                        //Deletes the InventJournalTable table, the InventJournalTrans will auto delete because of the Delete actions.
                        if (_deleteJournalIfErrors)
                            _journalTable.delete();
                    }
                }
            }
        }
    

  • Siddy Mujumdar Profile Picture
    4 on at
    RE: How to post invent transfer journal through x++ in d365 f&o

    thanks for reply

    in search i am getting this code only but in 365 return type journal check post so i am not getting what to do.

    inventJournalCheckPost =

    InventJournalCheckPost::newJournalCheckPost

    (JournalCheckpostType::Post,inventJournalTable);

    inventJournalCheckPost.parmThrowCheckFailed(_throwserror);

    inventJournalCheckPost.parmShowInfoResult(_showinforesult);

    inventJournalCheckPost.run();

    inventJournalTable.SystemBlocked = false;

    inventJournalTable.update();

  • Ludwig Reinhard Profile Picture
    Microsoft Employee on at
    RE: How to post invent transfer journal through x++ in d365 f&o

    Hi siddy,

    Can you share what you already tried doing and any error messages / things that did not work.

    Many thanks,

    Ludwig

  • Ludwig Reinhard Profile Picture
    Microsoft Employee on at
    RE: How to post invent transfer journal through x++ in d365 f&o

    moved to the d365 forum

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 1,113

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 286 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 215 Most Valuable Professional

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans