- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2023 02:21 AM
Hi,
I have a ui action for redirection url who does not work and i don't know how to do that.
I have my ui action script:
and i have this error in my console when i click on the button
But if i take the url and i open a new window and i paste the url, i am on the good page
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2023 03:45 AM
Hi,
I have tested this and it is working fine for me in both UI.
Use below scripts:
function openWorkspace() {
g_navigation.openPopup("/now/hr/agent/record/sn_hr_core_contract/" + g_form.getValue('u_contract'));
}
Workspace client script:
function onClick(g_form) {
var url = "/now/hr/agent/record/sn_hr_core_contract/" + g_form.getValue('u_contract');
open(url);
}
NOTE: Make sure contract field is added on HR Case form and it is added in all Views (default and workspace).
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2023 03:53 AM
That means your HR Case view does not have Contract field on the form. It must be in backend, Add it to form by configuring form layout.
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2023 02:48 AM - edited 12-26-2023 03:08 AM
Hi @Anisse Mahtat ,
Please try below:
function openWorkspace() {
g_navigation.openPopup("/now/hr/agent/record/"+ g_form.getTableName() +"/" + g_form.getUniqueValue()); // or hardcode the table name
}
make your UI Action to run on "Client" by checking check box and call the function name in onClick box.
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2023 02:53 AM
I have try this but that does not work, (i have to open the child record 'contract' in the record hr case and in my workspace ), i have nothing i stay in my page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2023 03:01 AM
Can you please share your UI Action configuration screenshots and script?
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2023 03:05 AM