Hi all! Is there a way to update a related record ...
# suiteflow
g
Hi all! Is there a way to update a related record when your current record is deleted?
e
Hard to tell without more detail, but Workflow Actions have a
DELETE
event.
g
Right, I've got that working. The issue is, is there an "update related record" worflow action type?
e
No, not as far as I know You would need a script for that, maybe a Workflow Action Script
g
I got it working with a simple user event script instead
1
c
You can use a User Event script on the beforeDelete trigger to update related records before the main record gets removed. Just query for the related records and update them in the same script execution. Make sure to handle any potential circular reference issues if the related records also have delete triggers.