Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

how to dot walk SC task field value to populate in RITM

sri2020
Kilo Contributor

HI,

 

I am trying to update value in Task form i.e Affected_CI.  but after closure of this task, i have an notification workflow activity  where this value to be captured.

 

I couldn't dot walk the SC task fields from Notification work flow activity. Could you please guide me to have a run script to capture the value in either configuration Item field or Affected_ci of the RITM. so that i can get this value to be in the email notification

 

Thanks

Sri

7 REPLIES 7

Hi,

That is what. So you have to write a email script and call that in notification body.

Can you show the email script you wrote and how are you calling it.


Thanks,
Ashutosh

email script : 

 

var sctask = new GlideRecord('sc_task');
sctask.addQuery('request_item',current.sys_id);
sctask.query();
if(sctask.next()){

template.print(''+sctask.cmdb_ci.getDisplayValue());

}

})(current, template, email, email_action, event);

 

am calling script as follows : 

 

${mail_script:name of the script} 

 

 

please help.

 

Regards

Sri

Is this working or not?


Thanks,
Ashutosh