Re-evaluate/Refresh UI Actions on Form After Related list Updates Without Hard Refresh in workspace.

PreethikaG
ServiceNow Employee
ServiceNow Employee

I have a form declarative action named "Submit for Approval" on the Quote form in workspace.

The expected behavior is that the action should re-evaluate validations and update the UI actions on the form accordingly.

These validations depend on the Quote Line records in the related list.

However, when I update a Quote Line, the UI actions on the Quote form are not re-evaluated automatically. A hard refresh is required to see the changes.

Is there a way to trigger the re-evaluation of UI actions without needing a hard refresh?

2 REPLIES 2

Voona Rohila
Kilo Patron
Kilo Patron

Hi @PreethikaG 

We had a similar req, the buttons will not be visible unless the form is  re-loaded

Take a look at this and see if this works in your UI Action code- https://servicenowguru.com/client-scripts-scripting/reload-form-related-list-client-script/

 

We have this button OOTB  here, which reloads the current form but not the complete page.

VoonaRohila_0-1739800887979.png

As an Alternative We have provided Reload Form Button on the form ( Create a Client UI Action with below code in workspace client script)

VoonaRohila_1-1739801068241.png

 

g_form.reload();

 

 

 


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

maheshkhatal
Mega Sage

@PreethikaG Just wondering if location.reload() should do the trick here? May be you can try not sure though.

 

Thank you,

Mahesh.