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

Ashutosh Munot1
Kilo Patron
Kilo Patron

Hi,

You can write a email script and call that in notification activity.

Script:

var sctask =  new GlideRecord('sc_task');

sctask.addQuery('request_item',current.sys_id);

sctask.query();

if(sctask.next()){

template.print('Affected CI : '+sctask.field_name.getDisplayValue());

}

Assuming that the affected ci field is created on sc_task table.


Thanks,
Ashutosh

hi Munot,

 

its not working.

 

Affected CI is from Task(task) table.   Task12322 number.

Regards

Sri

Hi,

Are you talking about a field or a related list?

Thanks,
Ashutosh

Hi,

 

REQ->RITM->Task

 

From one task, Affected CI field (cmdb_ci) value is entered by the assginee. Now, after the closure of this task,  i want to capture this in Notification workflow activity. Workflow is on RITM table.

 

Regards

Sri