If we save a transaction using an email plugin script, will a UE script run after the tran is saved or is that not possible in the same way indirectly triggering a UE script from a UE script is not possible.
n
Nicholas Klug
01/10/2022, 4:15 PM
I'm almost certain it won't trigger that subsequent one. However, you could execute a suitelet in the UE to do your logic.
You have to be extremely careful to only execute it in the context of an e-mail UE to avoid a potential infinite loop (which is why they block UEs from executing on UEs)
Nicholas Klug
01/10/2022, 4:17 PM
A better thought would be to examine your architecture of what you're trying to do
Nicholas Klug
01/10/2022, 4:18 PM
1. Could you accomplish your part A logic in a before submit and your part B logic in an after submit?
2. If it's not extremely time sensitive, could you mark your record with a "Needs update" checkbox and have a Map/Reduce run every 15 minutes on those with a checkbox, process, then clear the checkbox?
c
Craig
01/10/2022, 4:45 PM
@Nicholas Klug point 2 is the solution I was thinking of.
Craig
01/10/2022, 4:46 PM
The email plugin script reads the contents of an email to approve or reject a transaction, the UE script then does "something" to the transaction (and creates a custom record) to localise some content for the Italian market - the UE script is part of an NS bundle so I can't see the code or change the code, it's a bit of a black box.
n
Nicholas Klug
01/10/2022, 4:48 PM
Ooof, gotcha. Yeah, without getting into the weeds, this sounds like something you'll have to finagle with a Suitelet to trigger