
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2024 06:54 AM
Hi,
We would like to create a change from a catalog task, and can achieve this simply by using the following script in a ui action:
var url = new GlideURL("change_request.do");
url.set("sys_id" , "-1");
url.set("sysparm_query" , "^parent=" + current.sys_id);
action.setRedirectURL(url.toString()+"");
is there a way to amend the script to set other fields, for example the Short Description, from the parent catalog task??
Solved! Go to Solution.
1 ACCEPTED SOLUTION

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2024 08:12 AM
Yes, you need to add it on one set(). Like this:
var url = new GlideURL("change_request.do");
url.set("sys_id" , "-1");
//url.set("sysparm_query" , "^parent=" + current.sys_id);
url.set("sysparm_query" , "^short_description=" + current.short_description +^parent=" + current.sys_id);
action.setRedirectURL(url.toString()+"");
10 REPLIES 10

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2024 08:12 AM
Yes, you need to add it on one set(). Like this:
var url = new GlideURL("change_request.do");
url.set("sys_id" , "-1");
//url.set("sysparm_query" , "^parent=" + current.sys_id);
url.set("sysparm_query" , "^short_description=" + current.short_description +^parent=" + current.sys_id);
action.setRedirectURL(url.toString()+"");