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.

Copy short description of record producer to the incident

Chirag Pathak
Tera Contributor

Hi community,
I had a requirement to add the short_description of the record producer to the incident's record producer and similarly when a incident is created with the record producer it should update the channel on the incident to self-service

1 ACCEPTED SOLUTION

Jyoti Jadhav9
Tera Guru

Hi @Chirag Pathak 

If you know the short description of the record producer then you can store this value in variable as a static.

for ex.

var sd= 'Application Software Incident';

 current.short_description = sd;

current.contact_type = 'self-service';

 

JyotiJadhav9_0-1707488990726.png

 

Please hit the like button if my suggestion has helped you in any way.
Please mark correct if my response has solved your query.

 

Thanks & Regards

Jyoti Jadhav

View solution in original post

7 REPLIES 7

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Chirag Pathak 

 

It is OOTB , of you check record producer, and you raise incident from portal, you can see the incident is getting the contact Type to Self Service. 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Unfortunately that is not happening its creating the incident but not setting the channel to self-service

swathisarang98
Giga Sage

Hi @Chirag Pathak ,

 

You can write the below code in script part of RP so you can directly map the RP field field with incident table field 

current.short_description = producer.short_description; Here current.<incident field value> = producer.<record producer field value >
and for channel you can write current.contact_type = 'self-service';
 
swathisarang98_0-1707483824007.png

 

Please check and Mark Helpful and Correct if it really helps you.

Regards,

Swathi Sarang

 

Hi,
I did try that it did not work.