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

Check the data before validation receipt of of purchase order by x++

(0) ShareShare
ReportReport
Posted on by 15

Hello Experts,

below the code to validate the receipt of purchase orders, if the data is correct, the reception goes well otherwise it goes to the draft status, how to add code to check and display the errors before validating at the reception ?

i try the code below but it's not work 

  public void generateReceiptPO()
    {

       PurchFormLetter purchFormLetter;
     
       purchFormLetter = purchFormLetter::construct(DocumentStatus::PackingSlip);

        
       purchFormLetter.checkFormLetterId();
       purchFormLetter.checkBeforePost();

        purchFormLetter.getLast();
       purchFormLetter.showQueryForm(false);
       purchFormLetter.update(
       purchTable,
       strFmt("%1", invoiceOrderTable.InvoiceOrderId),
       DateTimeUtil::date(DateTimeUtil::utcNow()),
       PurchUpdate::All,
       AccountOrder::None,
       false,
       false);
      
    }

Many thanks

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    huijij Profile Picture
    19,811 on at

    Hi sir,

    Where are you calling this method? You can make a breakpoint in this code and see if you can enter this method.

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
Laurens vd Tang Profile Picture

Laurens vd Tang 299 Super User 2025 Season 2

#2
Siv Sagar Profile Picture

Siv Sagar 183 Super User 2025 Season 2

#3
André Arnaud de Calavon Profile Picture

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

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans