I have a WF Custom Action Script that deletes Child Custom Records when a parent record is deleted. I’m running into SCRIPT_EXECUTION_LIMIT_EXCEEDED on this. Would a MapReduce be a way around this?
c
creece
03/28/2022, 5:12 PM
For a parent-child record relationship, you should be able to do a UE an beforeSubmit on a delete, spin through the child record sublist and remove the lines which deletes them and then save. It'll take like 10 units at most and you don't have to go governance crazy.
j
jen
03/28/2022, 5:19 PM
So this is actually for a ‘reverse approval’ which we do with a Suitelet (deletes Invoice, purchase Orders, Bills for a Sales Order, and sets Sales Order back to unapproved). There could be many purchase orders / bills, and each could have several child records.
The child records are being deleted due to a WF that runs on delete of parent transaction
not happening in UI so I don’t think the UE idea will work in this case.
really my question is more of a general one: Does a MR use a separate governance queue since it is pushing execution off into a “task”
s
Sandii
03/28/2022, 5:23 PM
Each invocation of each stage of the MR has its own governance, so if designed properly then it could fix your problem in theory
s
Shawn Talbert
03/28/2022, 8:29 PM
though potentially introduce other problems that come along for the ride with MR scripts 🙂