- 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-17-2023 03:15 AM
Hi Hemanth,
You are 50% right here.
Let me tell you now clearly.
1. On the CTASK, we have a field (Yes/No) right?
2. So, once the user selects, Yes then another field will be shown using a UI policy and that field is of URL type.
3. That URL type field is navigating to new Change Request.
So, the requirement here is, once the user selects Yes on the Ctask and clicks that URL then it will take to new Change request right? So, in that Change request there is a field(Yes/No).
So, I want to make it Yes automatically, when the new CR form shown.
Regards,
Lucky

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2023 04:57 AM
Ok got it, Pass "sysparm_query" from your URL on the CTAKS
example:
New change url :
/change_request.do?sys_id=-1&sysparm_query=u_cmdb_cr=true
this would set cmdb cr field to true when user click on this URL from CTASK
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-18-2023 02:09 AM
Hi Hemanth,
I tried this but it's not working.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2023 02:36 AM
Hi @Lucky1
try :
/change_request.do?sys_id=-1&sysparm_query=type=normal&u_cmdb_update_from_ctask=yes
I think type is already set as normal right? so we are adding AND condition to set the cmdb field.
%3d is "="
%5e is "^"
let me know how it goes
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-18-2023 05:26 AM
Ok hemanth,
So this is my entire URL of Change Request.
Can you tell me how I can automatically put the value to yes in this url?
Regards,
Lucky