Josh Kenzer Posted August 27 Share Posted August 27 I'm trying to update a User Defined Dimension on the AP Bill Detail based on the value of the account number used. Trigger: Before Create, Before Update On field Change: Any update Record: AP bill detail Field to change: Restriction Change Formula: let [accountNum,nothing] = "{!APBILLITEM.ACCOUNTNO!}".split("-"); if(accountNum >= 50000){ return 10002; } I've verified it's running, and the formula works as it will successfully update the Memo field. However, when I try to update the dimension, it doesn't update. I tried the update via Postman using 10002 for the value of the User Defined Dimension, and it updates correctly. Is this a limitation of triggers? Link to comment Share on other sites More sharing options...
Josh Kenzer Posted August 28 Author Share Posted August 28 Any other method I've come up with to achieve this will cause a recursive loop. Any ideas on how to achieve this? @Louis Sterio2 Link to comment Share on other sites More sharing options...
Members Sterio, Louis Posted August 28 Members Share Posted August 28 Is this attempting to execute an API call in a document template? Can you provide the API call that is attempting to run? Link to comment Share on other sites More sharing options...
Josh Kenzer Posted August 28 Author Share Posted August 28 (edited) I tried to do that, but I think I started a recursive loop. The API called caused the trigger to fire and since the trigger is on the APBILLITEM which is what the API is updating, it caused the API to trigger again. Here the API call: <update> <APBILL> <RECORDNO>{!APBILLITEM.RECORDKEY!}</RECORDNO> <APBILLITEMS> <APBILLITEM> <RECORDNO>{!APBILLITEM.RECORDNO!}</RECORDNO> <AMOUNT>{!APBILLITEM.TRX_AMOUNT#value!}</AMOUNT> <ACCOUNTNO>{!APBILLITEM.ACCOUNTNO!}</ACCOUNTNO> <LOCATIONID>{!APBILLITEM.LOCATIONID!}</LOCATIONID> <VENDORID>{!APBILLITEM.VENDORID!}</VENDORID> <PROJECTID>{!APBILLITEM.PROJECTID!}</PROJECTID> <GLDIMRestriction>10002</GLDIMRestriction> </APBILLITEM> </APBILLITEMS> </APBILL> </update> What I'm attempting now is a "Update Field Value" trigger. Here is a screenshot: Edited August 28 by Josh Kenzer Link to comment Share on other sites More sharing options...
Recommended Posts