The CreatorCon Call for Content is officially open! Get started here.

Need to display the variable data on the RITM worknotes.

vinuth v
Tera Expert

Hi All,

 

I have created one variable on the task level that is "Please provide a description of the shipment issue" (this field is displaying only on the task level not on the RITM level) Once I save the task or close complete the task updating the data to the "Please provide a description of the shipment issue" then I need to update the "Please provide a description of the shipment issue" same data to the RITM worknotes.

 

 

Thanks in advance,

Vinuth

 

4 REPLIES 4

Vijay Balotia1
Tera Guru

Hi @vinuth v 

 

Can you please tell are you using flow designer or you are using workflow.

 

Hi @Vijay Balotia1 

I am using the work flow.

 

Thanks,

Vinuth

Ankur Bawiskar
Tera Patron
Tera Patron

@vinuth v 

you can use after update business rule on sc_task table

Condition: current.state Changes to Closed Complete AND current.request_item.cat_item.name == 'Your Cat Item Name Here'

Script:

(function executeRule(current, previous /*null when async*/) {

	// Add your code here
	var ritm = current.request_item.getRefRecord();
	ritm.work_notes = current.variables.variableName; // give here the variable name
	ritm.update();

})(current, previous);

OR

you can use Run Script as well after the Catalog Task completion

current.work_notes = current.variables.variableName; // give here the variable name

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@vinuth v 

Hope you are doing good.

Did my reply answer your question?

If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader