how to stop passing 'special instructions' value to before sc task activity in workflow

raj765_32
Tera Contributor

hi can anyone help me with scenario for 

when i submit a catalog item there are three sc tasks in where i have written a code in 2 and 3 rd sc task to display some value in special instructions field.

 

What happening is that after i close complete 1 st sc task, the data/value written in  2 and 3 sc task is getting displayed when 1 st sc task is closed complete. 
please help me how to fix this and where to fix this in which sc task.

below is the code :
i have written this code in workflow 2nd and 3rd  catalog task activity

var gr = new GlideRecord('sc_request');
gr.addQuery('sys_id', current.request);
gr.query();
 
if(gr.next())
{
gr.special_instructions = "1. Complete template to request EP End User Access form Blue Yonder. \n\n2. Submit request (Medium priority) via Blue Yonder portal.";
gr.update();
}

my requirment is that special instructions value should not display in 1 st sc task when the task is completed  and what ever state it should display in 2 and 3 rd sc task only
1 ACCEPTED SOLUTION

So I added the line in the catalog task and it was updated in the tasks.

u_special_instructions = 

Dhanashree1_1-1714203336251.png

 

and it was updated in the task. It was not updated in the 1st one as per your requirement. If you have created the field check the name of the field that you have created. 

 

Dhanashree1_0-1714203083091.png

 

View solution in original post

12 REPLIES 12

Please clarify few questions and I'll try this out -

1. So the special_instruction field is on catalog_item form as well on the sc_task field?

2. should it be updated on catalog_item and 2nd and 3rd tasks?

Spl instructions is on catalog task, it should be updated in 2 and 3 sc task only

So I added the line in the catalog task and it was updated in the tasks.

u_special_instructions = 

Dhanashree1_1-1714203336251.png

 

and it was updated in the task. It was not updated in the 1st one as per your requirement. If you have created the field check the name of the field that you have created. 

 

Dhanashree1_0-1714203083091.png