- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2023 10:57 PM
When I'm on the particular table form, looks like the change of the value in it's Related List made by other user is not reflected unless I refresh the browser.
Is there any way to make Form auto-refresh when other user updated the value of Related List record?
Best Regards,
Aki
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2023 12:03 AM
Yes , client script will run for only person who is updating.
But if you are thinking to have something similar at server side to work when updating person is different and viewer is different then I believe forcing page refresh on specific interval can work but it was a very big impact in terms of loss of unsaved information.
Scenario: imagine you set auto refresh form in every 5 seconds.
Now if some one is creating incident and filling out form data and in the middle of that page refreshes after 5 seconds then all the data entered into fields will be gone.
So its not helpful.
keeping all the possibilities in mind, i might have pushed back to requester of this requirement with all these facts.
Regards,Sushant Malsure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2023 11:04 PM
Hi @Aki18 ,
You can use the setTimeout() or setInterval() functions in JavaScript to trigger a refresh of the form page after a specified time interval. For example, you can use the following code snippet in a client-side script to refresh the form page every 5 seconds:
setTimeout(function() {
location.reload();
}, 5000);
This will reload the form page every 5 seconds, which will reflect any updates made by other users in the related list.
If my response was helpful in resolving the issue, please consider accepting it as a solution by clicking on the ✅Accept solution button and giving it a thumbs up 👍. This will benefit others who may have a similar question in the future.
Thank you!
Ratnakar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2023 02:11 AM
Hi @Ratnakar7 ,
Thank you for your reply, but could you tell me where I should write that script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2023 02:22 AM
hello @Aki18
Something similar is achieved by using onCellEdit client script
https://www.servicenow.com/community/developer-forum/reload-form-when-update-record/m-p/1364878
you just have to adjust your table and see it automatically reloading the form
Regards,Sushant Malsure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2023 11:04 PM
Hi @sushantmalsure ,
Thank you for your information! I tried that way, but looks like the OnCellEdit Client Script reloads the form only for the updated person. What I would like to do is to update "my" form when "other user" updated the cell value of the Related List record in current form.
Do you have any solutions for this requirement?