Creating a change request from incident in SOW view.

ankitsourav
Tera Contributor

When creating a change request from incident in SOW view, some fields are getting populated from incident form like:
CI

description

short description 

priority

 

There is a client requirement in which they want to populate business_service field also from the incident record at the time of change creation.  How can we achieve this?

ankitsourav_1-1748347448582.png

 

 



10 REPLIES 10

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @ankitsourav 

 

https://INSTANCENAME.service-now.com/now/nav/ui/classic/params/target/sys_ui_action.do%3Fsys_id%3D1d850156230123001488dc1756bf6504%26sysparm_record_target%3Dsys_ui_action%26sysparm_record_row%3D8%26sysparm_record_rows%3D54%26sysparm_record_list%3DnameCONTAINSchange%255EORDERBYorder

*************************************************************************************************************
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]

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

We checked the incident properties and UI Action / declarative UX Action and make the change. It didn't worked.

ankitsourav
Tera Contributor

ankitsourav_0-1748413445252.png

This UX action is responsible for creating the change in Service operation workspace; however, there doesn't appear to be any configuration for field mappings.

@ankitsourav 

1 workaround is this

1) create onLoad client script on change_request table which runs on workspace view

2) check the URL and see if it contains incident sysId

3) get that sysId, use GlideAjax to get incident field value

4) then set the CHG field with the value returned by Ajax function

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

@ankitsourav 

this is the URL you get when I did the alert on new CHG

It has INC sysId

Get the value by using string/regex manipulation

Use GlideAjax and then get the value and set in CHG field

I hope I have answered your question

AnkurBawiskar_0-1748421148993.png

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