How to access a record's URL in UI Action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2016 10:33 AM
We have a requirement of conditional logic in a UI Action. I'm trying to pass in the application state via a custom query parameter in the record's URL. For example the portalmode parameter below: (blahs in place of sys id)
/sysapproval_approver.do?portalmode=yes&sysparm_view=ess&sys_id=blahblah
However when I use gs.action.getGlideURI() (following this solution https://servicenow-pub.hosted.jivesoftware.com/thread/222681 ) in the UI Action script, the string I get back does not match the parameters I passed to the record. I'm getting back sysparm_tiny=blahblahblah
What am I doing wrong? Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2016 07:05 AM
I ended up not using the server-side API to read URL parameters. I re-designed the solution to leverage sysparm_stack parameter to force a redirect, which also worked for the problem I had. Thanks all!