How to set workflow false in scoped application when a user cancel the request.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2023 07:39 AM
Hi All,
I have created a scoped application. When a user cancel the request in approval state ,my task and approvers(which is from related list) should be cancelled.I have created a custom table for task.Providing you the BR and Script Include screenshot.Kindly help me with the solution.
Thanks,
Vishnu Priya V
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2023 08:11 AM
I believe the script must not be working .
and its not working because in script include you are missing iterator:
add following
replace line 11 to 13 with
while(gtask.next()){
gtask.state = '4';
gtask.setWorkflow(false);
gtask.update();
}
and replace line 22 to 24 with following:
while(gapp.next()){
gapp.state = 'cancelled';
gapp.setWorkflow(false);
gapp.update();
}
Regards,Sushant Malsure