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.

Mapping catalog item variables to RITM and sc task -short description and description

Mounika30
Kilo Sage

Mapping catalog item variables to RITM and sc task -short description and description

9 REPLIES 9

Is there any way to achieve the for the sc_task using after BR?

Hello @Mounika30 

are you using Flow Designer or Workflow, tell me first. then solution is easy.

If it is Workflow then : use Run Script to set values after sctask created.

var sc =current.request.getRefRecord();

sc.short_description=current.cat_item.short_description;

sc.description=current.cat_item.description;

sc.update();

 

OR Try this in your SCTASK Created from Flow Designer as :

GauravShirsat_0-1736418240818.png

 

 

 

 

@Mounika30 

using BR if you wish to do so, do it using before/ insert OR after / insert on sc_task table.

 

GauravShirsat_1-1736419077636.png

Thanks and Regards

Gaurav Shirsat

 

Hi @Mounika30 

There is small correction in the business rule script.

I have tested in my PDI : it is working.

I would recommend you use below BR instead of After Business Rule

Business Rule : before-insert

Script :

current.short_description=current.request_item.cat_item.short_description;
current.description=current.request_item.cat_item.description;
current.setWorkflow(false);
current.update();
 
Please accept my solution are Correct, if it tested pass in your system.
 
Thanks and Regards
Gaurav Shirsat

Ankur Bawiskar
Tera Patron
Tera Patron

@Mounika30 

Didn't get your requirement completely.

Please explain in detail

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