How do I delete child records in Deluge?
subforms_ids = System_Summary[ID == input.ID].System_Event;
for each sub in subforms_ids
{
delete from System_Event[ID == sub];
}
When I try to save this, I get this error message:
Failed to save the function
- Syntax error. Expecting expression,invokeurl task or 'invokeintegration'. Found '['. Line Number: 1
I'm not sure how to interpret that error. What am I doing wrong in my script?
I created this script as follows:
- Go to Workflow Rules
- Create a Rule
- Select the System Summaries module
- Set the rule to execute on Record Action
- Select "Delete"
- Click Next
- Apply the rule to All System Summaries
- Click Next
- Select Function
- Select Write Your Own
- Fill in the Create New Function form and click Create