Supplier custom spend limit
I need to create a customisation where we implement a spend limit at the supplier level (for example £5,000). If there are current open POs around this level and the user tries to create a new one breaching this limit, the system should stop that.
I have already created a custom field at supplier where we can enter this amount limit but I am struggling to derive the existing open PO value in the custom workflow which will basically trigger the error. Please advise on how I can dynamically get the current open POs for the supplier every time the user tries to create PO with the particular supplier.