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

Announcements

No record found.

News and Announcements icon
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

(9) ShareShare
ReportReport
Posted on by 2,430
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 
I have the same question (0)
  • Sukrut Parab Profile Picture
    71,741 Moderator on at
    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?
  • faiz7049 Profile Picture
    2,430 on at
    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
  • faiz7049 Profile Picture
    2,430 on at
    Hi Experts,
     
    Please help me.
     
    Thanks,
    Faiz
  • Martin Dráb Profile Picture
    239,632 Most Valuable Professional on at
    What about simply checking the status change in PurchParmTablePurchTableType.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
    2,430 on at
    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");
            }
        }
    }
     
  • faiz7049 Profile Picture
    2,430 on at
    Hi Experts,
     
    I need your help.
     
    Thanks,
    Faiz
  • Layan Jwei Profile Picture
    8,165 Super User 2026 Season 1 on at
    Hi,

    If the status gets modified, then the 'modifiedField' method should be called

     
  • faiz7049 Profile Picture
    2,430 on at
    Hi Layan,
     
    Thank you for reply. I did not find field DocumentState in modifiedField method neither in PurchTable nor PurchParmTable
     
    public void modifiedField(FieldId _fieldId)
    {
    
    }
    
    
    Thanks,
    Faiz
  • faiz7049 Profile Picture
    2,430 on at
    Hi Experts,
     
    Please, I need your help on this.
     
    Thanks,
    Faiz
  • faiz7049 Profile Picture
    2,430 on at
    Hi Experts,
     
    Please help me.
     
    Thanks,
    Faiz

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 164 Super User 2026 Season 1

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 105 Super User 2026 Season 1

#3
Zain Mehmood Profile Picture

Zain Mehmood 89 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans