Show Client checked true UI action in service portal

Prakash43
Tera Contributor

Hi ,

I have a requirement to add a client marked true ui action on a form on portal.

Any Idea how can i achieve this would be helpful

Thank you

2 REPLIES 2

Pavankumar_1
Mega Patron

Hi @Prakash43 ,

can you share more details?

 

If it helps please click Accept as Solution/hit the Thumb Icon.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar

Markus Kraus
Kilo Sage

Out of the box, this is not possible because any UI Action with "Client = true" will not be loaded by the OOTB Form Widget. Depending on the requirement you have the following options:

  1. Clone the OOTB Form Widget, you have to modify the HTML, the Client Controller and the Server Controller to load the UI Action configuration, display it on the form, take care of the security etc. (condition, view, roles) and also do the submit part (this is extremely complex, and also you then have take care of all widget-maintenance on every upgrade and all patches!)
  2. Create a "Service Portal-Only" UI Action that does the same as your current ui action and use the technique which i demonstrate in the following article: How To: Enable Client Side UI Actions on Service Portal (OOTB Form Widget, No Clone required!)
    Note: To only show a certain UI Action in the service portal only, add the following Condition: 

 

gs.action.getGlideURI().toString().startsWith('api/now/sp') ​