I have a WF Custom Action Script that deletes Chil...
# suitescript
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?
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.
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”
Each invocation of each stage of the MR has its own governance, so if designed properly then it could fix your problem in theory
though potentially introduce other problems that come along for the ride with MR scripts 🙂