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
Unanswered

How to get Purchase order field Approval status when get Approved

(8) ShareShare
ReportReport
Posted on by 2,382
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,710 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,382 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,382 on at
    Hi Experts,
     
    Please help me.
     
    Thanks,
    Faiz
  • Martin Dráb Profile Picture
    237,880 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,382 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,382 on at
    Hi Experts,
     
    I need your help.
     
    Thanks,
    Faiz
  • Layan Jwei Profile Picture
    8,112 Super User 2025 Season 2 on at
    Hi,

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

     
  • faiz7049 Profile Picture
    2,382 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,382 on at
    Hi Experts,
     
    Please, I need your help on this.
     
    Thanks,
    Faiz
  • faiz7049 Profile Picture
    2,382 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

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 296 Super User 2025 Season 2

#2
Siv Sagar Profile Picture

Siv Sagar 178 Super User 2025 Season 2

#3
André Arnaud de Calavon Profile Picture

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

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans