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
Unanswered

How to get Purchase order field Approval status when get Approved

(6) ShareShare
ReportReport
Posted on by 2,078
Hi Experts,
 
I want to catch Purchase order field Approval status when het Approved.
There are some classes VersioningDocument,VersioningPurchaseOrder,VersioningPurchaseOrderResponse. I tried many times debugger it's trigger in Draft and Inreview but not in Approved.
I need your support. Which class other than above if any and which method.
 
Thanks,
Faiz 
  • faiz7049 Profile Picture
    faiz7049 2,078 on at
    How to get Purchase order field Approval status when get Approved
    Hi Martin,
     
     
    I am trying by below code but it's not triggering on debug.
     
    [ExtensionOf(tableStr(PurchParmTable))]
    final class SFA_PurchParmTable_Extension
    {
        public void update()
        {
            next update();
            PurchTable purchTable = PurchTable::find(this.PurchId);
            if(purchTable.DocumentState==VersioningDocumentState::Approved)
    
            {
                info("Approved");
            }
        }
    }
     
  • Martin Dráb Profile Picture
    Martin Dráb 231,295 Most Valuable Professional on at
    How to get Purchase order field Approval status when get Approved
    What about simply checking the status change in PurchParmTable.updated()? When the status changes to Approved and payment terms are "Adv", you can create an email to be sent by a batch (outside the transaction).
  • faiz7049 Profile Picture
    faiz7049 2,078 on at
    How to get Purchase order field Approval status when get Approved
    Hi Experts,
     
    Please help me.
     
    Thanks,
    Faiz
  • faiz7049 Profile Picture
    faiz7049 2,078 on at
    How to get Purchase order field Approval status when get Approved
    Hi Sukrut,
     
    Thank you for reply, I am trying if PO status is Approved and PO Terms of payment in "Adv" send email to department that PO is approved kindly confirm the PO and Make advance payment.
     
    Thanks,
    Faiz
  • Sukrut Parab Profile Picture
    Sukrut Parab 71,680 Moderator on at
    How to get Purchase order field Approval status when get Approved
    What's are you trying to achieve by finding where the status of PO changes. Can you explain more about what you are trying to accomplish?

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,479 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,295 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans