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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

How to create PO from PR using PurchAutoCreate_PurchReq ?

(2) ShareShare
ReportReport
Posted on by 6
Hi Members,
 
I have a situation where I will be receiving information such as Purch Req Id, item Id, line number and vendor account of PR item from an external system and I would like to create a custom service to get this information and automatically create a PO in D365FO system.
 
I cam across a class PurchReqAutoCreate_PurchReq but do not know on how to utilize this for creating PO . Could you please help me out with a code snippet on how to call this call and create a PO using the parameters in 1st line please.
 
Thanks in advance !!!
I have the same question (0)
  • Layan Jwei Profile Picture
    8,112 Super User 2025 Season 2 on at
    Hi,

    If you have PurchReqId, why do you itemId and line number?

    I didn't try it before, but looking at the methods available in the class, maybe you can do sth like that?

    PurchReqTable purchReqTable = PurchReqTable::findPurchReqId("YourPurchReqId");
    purchAutoCreate = PurchAutoCreate::construct(purchReqTable, this);
    purchAutoCreate.create();
     
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,390 Super User 2025 Season 2 on at
    Hi,
     
    I don't think you need a call PurchReqAutoCreate_PurchReq Class.
    But you can created througt x++.
    Please refer to this.
     
    Best regards,
    Mohamed Amine MAHMOUDI

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 584 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 254 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans