UI Action in Configurable Workspace does not properly redirect to Record Producer

Marc D
Tera Contributor

Hello, everyone. I am currently working for a project, and we are starting to migrate from Workspace to Configurable Workspace. However, we are having issues with how UI Actions are behaving.

We have many UI Actions in place that, when clicked, are supposed to redirect the user to a Record Producer so they may fill out and submit a form. This is how it works for Workspace. But in Configurable Workspace, the UI Actions instead redirect the user to the Record Producer configuration page, i.e. the backend page where the Record Producer gets created.

This is an example of what we redirect to in Workspace, and what we want it to redirect to:

Workspace UI Action result.png

And this is an example of the same UI action being clicked in Configurable Workspace at the moment:

Configurable Workspace UI Action result.png

Our team is not sure why this is happening. Included in the attachments are the UI action script and related OnLoad client script that have properly worked for Workspace.

 

Could anyone help with this issue?

4 REPLIES 4

Community Alums
Not applicable

HI,

@Marc D ,

Update the UI Action Script
Instead of using a direct window.location or action.setRedirectURL() to the Record Producer’s backend path, force the Service Portal (SP) URL. For example:

action.setRedirectURL("/sp?id=my_record_producer&table=incident&sys_id=" + current.sys_id);

 

also

If the SP URL might change, store it in a property:

var recordProducerURL = gs.getProperty('myapp.record_producer.url') + "&sysparm_query=..." + current.sys_id;
action.setRedirectURL(recordProducerURL);


 

Hello, Tejas.

If you look at the provided scripts, my team is not using window.location or action.setRedirectURL(), which from what I have found is server-side scripting. We are using client-side script with g_service_catalog.openCatalogItem().
In addition, the problem is not that the script does not work at all, it is that it works for regular Workspace, but not for Configurable Workspace.

Ankur Bawiskar
Tera Patron
Tera Patron

@Marc D 

script looks fine.

Did you try creating a fresh UI action?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hello, Ankur.

For this specific UI Action, it is fairly new - it was created with the initial project to migrate to Configurable Workspace. I am unaware of how new the other UI Actions are, but seeing as how all of them have this same behaviour, we don't think this freshness is the issue. We're wondering if this is a known issue with Configurable Workspace at this point.