- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2023 06:17 AM
Hello All,
In the workflow, after a task completion, I am creating a record in a change request table,
So, can someone tell me how to navigate the user to the created change request. Because he then goes to the form and clicks on Request approval.
Regards,
Lucky
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2023 08:03 AM
@Lucky1 ,
I have already posted in one of my replies
Steps :
You can remove default value on the URL field
In your create task workflow activity , script section have this logic
var chg = current.getDisplayValue('change_request'); // this will give you the change number
chg = " This CR is created from the"+" "+chg
//in the URL after u r passing "^u_cmdb_update_from_ctask=yes" add ^short_description=chg
//example url looks below and update the URL field , you can see chg is passed without quotes and its awlays dynamic
current.urlfieldvalue ="/change_request.do?sys_id=-1&sysparm_query=chg_model=007c4001c343101035ae3f52c1d3aeb2^type=normal^short_description="+chg +"^EQ&sysparm_use_polaris=true&sys_target=change_request&sysparm_referring_url=change_request_list.do%3Fsys_id%3D-1%26sys_target%3Dchange_request%26sysparm_fixed_query%3D%26sysparm_group_sort%3D%26sysparm_query%3D%26sysparm_target%3D%26sysparm_view%3D";
Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2023 01:29 AM
Hi Hemanth,
1. Yes, i have hard coded in the Default value of URL field.
2. How can I pass CR number dynamically from Create Task activity in the work flow? As I need to show the link on the Change task form.
Please guide me here, this is my last step on this task.
Regards,
Lucky

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2023 08:03 AM
@Lucky1 ,
I have already posted in one of my replies
Steps :
You can remove default value on the URL field
In your create task workflow activity , script section have this logic
var chg = current.getDisplayValue('change_request'); // this will give you the change number
chg = " This CR is created from the"+" "+chg
//in the URL after u r passing "^u_cmdb_update_from_ctask=yes" add ^short_description=chg
//example url looks below and update the URL field , you can see chg is passed without quotes and its awlays dynamic
current.urlfieldvalue ="/change_request.do?sys_id=-1&sysparm_query=chg_model=007c4001c343101035ae3f52c1d3aeb2^type=normal^short_description="+chg +"^EQ&sysparm_use_polaris=true&sys_target=change_request&sysparm_referring_url=change_request_list.do%3Fsys_id%3D-1%26sys_target%3Dchange_request%26sysparm_fixed_query%3D%26sysparm_group_sort%3D%26sysparm_query%3D%26sysparm_target%3D%26sysparm_view%3D";
Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2023 11:32 PM - edited 07-24-2023 02:30 AM
Hi Hemanth,
Thanks a lot for your Patience and helping on this.
Thanks a lot.
it's working
Regards,
Lucky