How to reload all the record of a table using script.

abhaysingh98
Tera Contributor

Is there any way we can reload all the record once because if I reload it then my on load script will update the field automatically but the issue is that I don't want to open all the records manually and then reload it.

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@abhaysingh98 

reload what it means?

Are you saying if someone has opened incident form and you want a background script/job to reload that incident?

If yes then when you update a record from background the changes are reflected automatically on the field and will show a particular icon saying field got changed.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Ankur Bawiskar ,

I have a field in a form which is getting value from a client script and saved in database so this field data is visible on list view for a new record and for a record which we open and update it but I want this field to be updated for old records by a script not by manually updating the records.

Najmuddin Mohd
Mega Sage

Hi @abhaysingh98 ,

Any possibility of converting the logic of on-load client script into a Server side scripting and Updating all the records at one go from the Scripts - background.

If the above information helps you, Kindly mark it as Helpful and Accept the solution.
Regards,
Najmuddin.

Community Alums
Not applicable

Hi @Najmuddin Mohd 

we can use the g_form.refresh(); in beginning of your client scritp.