Workspace Save button not refreshing the tab

abhi555
Tera Contributor

We have a custom workspace built using UI Builder and currently we are seeing issue where when clicked on save button is not refreshing the workspace Tab, hence we are unable to notice if the form actually got saved until we manually reload.  

We have tried with g_form.save (client side) and current.update as well, these actions saves the record but the tab refresh is not happening and hence unable to notice if record got saved. Anyone has faced this issue ? 

In OOB workspace save button refreshes the tab automatically

4 REPLIES 4

dave_greene
ServiceNow Employee
ServiceNow Employee

Ensure you have

action.setRedirectURL(current);

In the UI Action...this should reload the same page you are on. 

 

 

Thanks Dave. 

Yes we already had below code set up, but it was not refreshing the page automatically. If we try to open the same page by changing to OOB workspace(Like HR), the tab is getting refreshed as expected. It just doesn't work with custom workspace.

 

==========

action.setRedirectURL(current);
current.update();

===========

Marc Mouries
ServiceNow Employee
ServiceNow Employee

In UIB custom workspaces, you need to trigger the event to refresh the component(s) you want to refresh. 

For example, if you're trying to refresh a list of records, you can call the refresh method on the data resource that feeds the list component by updating the refresh property on the list upon clicking the button. 

Can you provide more details about your workplace? is this a custom button or part of another component?

 

 

 

 

Hi Marc,

Thanks for the response.

We have NOT created UIB component for button, instead we are using custom UI action (Save) on targeted table. But when clicked on workspace UI action (Save) it is not refreshing the record Tab. If we open the same record by using OOB workspace (HR), the tab is getting refreshed. 

 

Below is the UI action code :

action.setRedirectURL(current);
current.update();

Do we have to call an event explicitly to handle this since it is a custom workspace ?

 

Thanks,

Abhishek