Set a state with UI Action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-28-2022 05:34 AM
Hi everybody! I need to set a particular state in a case by clicking a button from his task. I've created in the task a ui action that set the task state in waiting for approval, but I also want that by clicking that button it change the state of his case in "to be approved". So it will show the case in to be approved state and the task in waiting for approval.
which script should I use in the ui action? Or should I use a script in a policy or br? Thnx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-28-2022 08:34 AM - edited ‎12-28-2022 08:35 AM
In the line var caseNumer = current.case_parent_field;
if the 'case_parent_field' is reference field on task then use this query --> gr.addQuery('sys_id', caseNumer );
If the 'case_parent_field' is string field on task then use this query --> gr.addQuery('number', caseNumer ); // number will be the case number field which store case number on 'sn_customerservice_case' table.
Please try these changes.