Get Total Unbilled PO Amount on Vendor Record Using Client Side Script
Published on
August 31, 2023 at 9:17:12 AM PDT August 31, 2023 at 9:17:12 AM PDTst, August 31, 2023 at 9:17:12 AM PDT
Scenario
The total unbilled amount which can be seen in theAmountfield on theVendorrecord is based on the items' total quantity multiplied by their respective amounts. Some use cases permits users to change the rate of each item on theVendor Billrecord which will sometime exceed the totalPurchase Orderamount set in thePurchase Orderrecord.
Solution
The following code can be useful for approval processes if the user wants to flag vendor billsexceeding the totalPurchase Orderamount for approval.Run this code in thePageInitfunction of aClient Scriptdeployed to theVendor Billrecord: