Reloading a form after business rule executes

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2016 10:43 PM
I have a question. I am wondering if it is possible to reload a form after a business rule executes.
As an example, if a user attaches a file to a record and a business rule executes that moves that attachment to a new location, can I force the form to refresh so that it no longer shows the attachments that were added to the record?
I am assuming it would be client side, I just am not sure on how to code it.
Thanks!
https://youtube.com/watch?v=zYi8KhP9SUk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2016 12:12 AM
check out this link, it might be helpful !
Reload a Form or Related list from a Client Script - ServiceNow Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2016 12:27 PM
Thanks for this. I had seen it previously and it says what need to happen to reload the form.
I am just not sure how, from a client script perspective, to code it in a way that it would know that an attachment has loaded?
https://youtube.com/watch?v=zYi8KhP9SUk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2016 08:00 AM
Hi John. Did you ever find a solution for this? I have a similar need (total in related list incorrect after abort ). In my scenario a user is attempting to update an entry in a related list. If some condition is met, that update gets aborted. The problem is that the related list displays totals and the total reflects the aborted update rather than the true value. If I reload the form or the related list then the total is correct...I just can figure out how to force the reload of either
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2016 01:15 PM
Hi Cynthia,
In your business rule, assuming you have a current.setAbortAction(true), you need to add a action.setRedirectURL(current.parent) before the abort action. It could be current.parent or the field that you are using to relate the related list records to your main form.
Example:
action.setRedirectURL(current.parent);
current.setAbortAction(true);