Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

When using setRedirectURL can I specify the View to be used?

Brian Broadhurs
Tera Contributor

I have created a custom UI Action on the Release form to create a Change Request record linked to the Release. My problem is that the Release form is displayed using the Release view, and when I redirect to the newly created Change Request record, the system uses the Release view of the Change Request form - except there isn't a form defined for that view, and instead of displaying the default view, the system actually creates a form section for the Release view - but it doesn't bear any resemblance to any of the other views on the Change Request form.

I would like to be able to tell the system, in the UI Action script, to use the Default view when I specify the Redirect URL - is this possible?

Brian Broadhurst

1 REPLY 1

Brian Broadhurs
Tera Contributor

I managed to work this out with the help of a colleague:

chg.insert();
action.setRedirectURL("change_request.do?sys_id=" + chg.sys_id + "&sysparm_view=default");