How to display a record view as a pop up from Ui Action

wakespirit
Kilo Guru

Dear all,

I have a request to display a record view as  a popup window from a UI Action.

For exemple let say that I define a new view for editing a user call myUserView.
Then from a UI Action button I wold like to display that view as a popup window with a specific size, like a dialog box.

Then I can edit my user field and pressing Save button will save my record normally.

What is the way to do this ?

sample are welcome

regards

1 ACCEPTED SOLUTION

Mostly it is  gs.action.getGlideURI();uri.get('sysparm_view') != 'YOUR VIEW NAME'; which is evaluated, this reads th4e url and takes the parameter(view) to build the condition.

The link below will tell you how to prefill the form with some values if you want to.

https://docs.servicenow.com/bundle/helsinki-platform-user-interface/page/use/navigation/concept/c_NavigatingByURL.html

Please mark my answer correct/helpful if it helped you solve your issue.
-Anurag

-Anurag

View solution in original post

7 REPLIES 7

You can add this in the ui action's condition

 

var uri = gs.action.getGlideURI();uri.get('sysparm_view') != 'YOUR VIEW NAME';

This will prevent the ui action to show on the popup

 

Please mark my answer correct/helpful if it helped you solve your issue.
-Anurag

-Anurag

Thanks it works, but could you explain me how this condition is build and what it does exactly ?

How can it be a condition as there is a variable declaration and 2 method call on same line

thanks for clarification

Mostly it is  gs.action.getGlideURI();uri.get('sysparm_view') != 'YOUR VIEW NAME'; which is evaluated, this reads th4e url and takes the parameter(view) to build the condition.

The link below will tell you how to prefill the form with some values if you want to.

https://docs.servicenow.com/bundle/helsinki-platform-user-interface/page/use/navigation/concept/c_NavigatingByURL.html

Please mark my answer correct/helpful if it helped you solve your issue.
-Anurag

-Anurag