Close a modal of workspace using UI action

Teja45
Tera Contributor

Hi Everyone,

 

I have a the below requirement.

 

I created a custom table and placed the same in the workspace and created a button on the workspace which will create a new record in that particular table.

Teja45_0-1706628638146.png


On click of add application, it opens a modal dialog form as follows.

 

Teja45_1-1706628694343.png

After filling the details and click on Save the record is getting saved, but in additional the modal should also get close.

The save button is created from the UI action and enabled the workspace view and placed in workspace using UI builder action bar. I have tried using Event handlers ("close dialog") in Ui builder but it didn't worked.

 

Any other ways to close the dialog box.

 

Regards,

Raghavateja.

 

Can someone suggest 

1 REPLY 1

Badal Bhat2
Tera Contributor

try location.reload() in UI page client script (incase you are calling ui page from UI action);

 or refer the below community post:

https://www.servicenow.com/community/next-experience-articles/introduction-to-declarative-actions/ta...