Workspace UI Action

mmarinov007
Tera Contributor

I have the following server side UI Action that creates an assessment instance on the idea table. I want to be able to perform the same logic on the workspace. How do I do this? Should I create a new UI Action or enable client and workspace form button?

 

Server side script:

action.setRedirectURL('/esc?id=take_survey&instance_id=' + new global.PRO_AI_GOV_Utils().retrieveAssessmentInstanceData(current.getTableName(), current.getUniqueValue()).asmt_instance_id);
 

Condition:

javascript: !current.u_ai_involvement.nil() && new global.PRO_AI_GOV_ClientUtils().isTakeAssessmentButtonVisible(current);

 

I made it working with a pop-up modal but I want the user to be redirected (on the same page) to the service portal.

The attached image is my client script for the pop-up modal but for some reason I'm not able to get it working for simply going to the service portal.

 

1 REPLY 1

mayankkumar
Kilo Patron

Hi @mmarinov007 

Yes, if you want to implement the same logic on Workspace, you can enable the Workspace form button.

As for your second question—if you'd like the user to be redirected to the same page, you can use:
action.setRedirectURL(current);
This method accepts either a URL or a GlideRecord object.

If this helps, please mark it as helpful and accept it as the solution.
and if you are curious about how to run server-side code on client-side UI action do let me know.

Feel free to reach out if you need further assistance!

Thanks
Mayank