Set a state with UI Action

Alessia Russo
Tera Expert

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

5 REPLIES 5

Hi @Alessia Russo   

 

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.