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
Answered

Rules for re-approval of PO when value is changed

(6) ShareShare
ReportReport
Posted on by 53
Hi,
We are running D365FO version 10.0.41 with change management activated on POs.
We set the workflow to check on the Delta invoice amount to determine if re-approval is neccessary: If the value is over a certain amount, the PO should be re-approved. However, the calculation does not consider changes in charges on the PO lines. 
Anyone found a way to include the charges in the considerations?
I've tried setting up the policy rule to check for changes in charges, but then it will check even if the change is minimal. It should only be re-approved if the value is over a certain threshold. 
 
I appreciate any feedback you might have.
I have the same question (0)
  • Verified answer
    Holly Huffman Profile Picture
    6,554 Super User 2026 Season 1 on at

    hi there! this sounds like it may need customization to fit your need: 

    • Custom Workflow Extension:
      • Create a custom workflow extension to handle the re-approval logic. This extension will check for changes in both the PO amount and the charges.
    • Calculate Total Change:
      • Implement logic to calculate the total change in the PO value, including both the line amounts and the charges. This total change will be used to determine if re-approval is necessary.
    • Set Threshold for Re-Approval:
      • Define a threshold value for the total change. If the total change exceeds this threshold, the PO will require re-approval.
     
    ex: 
     
    public class CustomPOApprovalWorkflow extends WorkflowDocument
    {
        // Define the threshold for re-approval
        private const real ReApprovalThreshold = 100.00;
        // Method to check if re-approval is necessary
        public boolean isReApprovalRequired(PurchTable _purchTable)
        {
            real totalChange = this.calculateTotalChange(_purchTable);
            return totalChange > ReApprovalThreshold;
        }
        // Method to calculate the total change in PO value
        private real calculateTotalChange(PurchTable _purchTable)
        {
            real totalChange = 0.00;
            PurchLine purchLine;
            PurchLineCharge purchLineCharge;
            // Calculate change in line amounts
            while select purchLine
                where purchLine.PurchId == _purchTable.PurchId
            {
                totalChange += purchLine.LineAmount - purchLine.OriginalLineAmount;
            }
            // Calculate change in charges
            while select purchLineCharge
                where purchLineCharge.PurchId == _purchTable.PurchId
            {
                totalChange += purchLineCharge.ChargeAmount - purchLineCharge.OriginalChargeAmount;
            }
            return totalChange;
        }
    }

     

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 March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Mallesh Deshapaga Profile Picture

Mallesh Deshapaga 319

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 220 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 134 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans