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

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Post Product Receipt of Consignment Replenishment Order using X++

(0) ShareShare
ReportReport
Posted on by

Dear all,

I have requirement with customize form where user input all of data  and after that i have to do 2 actions below:

1. Auto create Consignment Replenishment Order -> Done

2. Auto Generate Product Receipt -> not yet

So how can i generate product receipt by using x++ on D365FO. Please help me if you guys have any idea or solution.

Thank you so much

Phuoc Dinh

I have the same question (0)
  • Verified answer
    Sumit Loya Profile Picture
    2,230 on at

    Hi Phuoc Dinh,

    You can try following code:

    ConsignmentReplenishmentOrderFormLetter consignmentReplenishmentOrderFormLetter;
    	ConsignmentDraftReplenishmentOrderJournalHeader parmTable;
    
            // Setting up the FormLetter framework data.
            consignmentReplenishmentOrderFormLetter.parmReplenishmentOrderHeader(sourceTable); //Replenishment order header
            consignmentReplenishmentOrderFormLetter.transDate(transactionDate);
            consignmentReplenishmentOrderFormLetter.printFormLetter(false);
            consignmentReplenishmentOrderFormLetter.usePrintManagement(false);
            consignmentReplenishmentOrderFormLetter.printout(Printout::Current);
    
            consignmentReplenishmentOrderFormLetter.chooseLines(true);
    
            update_recordSet parmTable
                setting ExternalDocumentNumber = 'Ext0001' // Use this code if you have a document reference from Vendor
                where parmTable.ParmId == consignmentReplenishmentOrderFormLetter.parmId();
            
    	consignmentReplenishmentOrderFormLetter.runOperation();

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Sumit Loya,

    I have try with your suggested and it working with me now. Thank you so much for your help

  • Community Member Profile Picture
    on at

    Hi Sumit Loya,

    And I have another question here in forum as the link below: community.dynamics.com/.../create-inventory-ownership-change-and-post-journal-through-x

    So if you have any ideas or suggestion please help me. Thank you so much

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Siv Sagar Profile Picture

Siv Sagar 283 Super User 2025 Season 2

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 213 Super User 2025 Season 2

#3
André Arnaud de Calavon Profile Picture

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

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans