Reloading a form after business rule executes

John VanBruggen
Giga Guru

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!

Check out my Consultant's Survival Guide
https://youtube.com/watch?v=zYi8KhP9SUk
21 REPLIES 21

Kushagra Mehrot
Kilo Guru

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?


Check out my Consultant's Survival Guide
https://youtube.com/watch?v=zYi8KhP9SUk

cyngoltz
Giga Contributor

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


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);


find_real_file.png