- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2017 07:13 AM
Good day team
I have a requirement to set the view of a form through a UI Action to a different table.
We have a UI Action on incident to create a new RITM for an equipment request.
The users have to set certain fields based on this view that was created (Equip_Request)
Is there a line of code to set the view in scripting
ie:
function createRITM() { //create the new Requested Item Record
var newReq = new GlideRecord("sc_req_item");
newReq.setView("Equip_Request");
}
That's not working
Thanks
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2017 06:54 AM
The redirect needs to include the view. Yours is simply going to the new request item record. Didn't you say you wanted to redirect to a specific view? That's where you'll have to build the URL including the sysparm_view= part I described above.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2017 02:51 PM
Have you checked the System Logs for any signs of trouble?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2019 02:09 AM
Hi Sangehr,
I was following the same article for one of my requirement. Can you please try to set the redirect to:
action.setRedirectURL('sc_req_item.do?sys_id=' + newReq.insert + '&sysparm_view=Equip_Request');
Let me know if it works..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2019 02:10 AM
Hi Sangehr,
I was following the same article for one of my requirement. Can you please try to set the redirect to:
action.setRedirectURL('sc_req_item.do?sys_id=' + newReq.insert + '&sysparm_view=Equip_Request');
Let me know if it works..