How to pass current record sys id from ui action to ui page in workspace?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 03:47 AM - edited 01-04-2024 03:48 AM
Hi Community,
Having an UI Action in workspace & on click of that UI Action ,an UI Page should gets open. There I need to validate the sys id of the current record but I'm struggling with it.
UI Action:-
I'm passing sys id of record in url & trying to retrieve in UI Page html.
UI Page:-
Can someone please help in this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 06:17 AM
check the URL you are forming correct? Can you check this url manually providing sys id in browser? Does it work?
Also, I would suggest define a variable url outside show frame. Something like below
var url = 'define your url here' ( test it manually and make sure it is correct)
g_modal.showFrame({
title : 'yout title here',
url :url,
size: 'fw'
});
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 06:30 AM
${sysparm_sysid} will work only when UI page is called using GlideDialogWindow when you set the preference
In your case you can get the URL value and parse and get the sysId
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 08:34 AM