This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - Refresh Form On Tab

Graham McCall - Monday, May 14, 2012 7:25 AM:

I have a second form displayed on a relationship tab under a main primary form..  I have some methods that hides/displays certain fields depending on the values in other fields on this second form..  Does anybody know a good way to refresh this second form programatically.?  I can refresh it by clicking the refresh button or clicking on another tab then back or by doing a save..  But I'm thinking there must be a way to do the refresh automatically..  I notice there are one or two other posts on form refresh but no answer to this use case..  Anybody have any ideas??



Yoann Maingon - Monday, May 14, 2012 8:04 AM:

Hi Graham ! 

Automatically upon which trigger?



Graham McCall - Monday, May 14, 2012 10:06 AM:

hi yoann, i have a javascript field event method (on change) that sets some field values..via handleitemchange...then another form event method (on form populated)..  that hides certain fields on the form.. based on field values set in the first method...  all works fine..  but you have to click the refresh button to get the fields to hide/show.. I want the form to refresh automatically..  I know there is the top.aras.uiCloseWindowEx(document.thisItem.getID()) command that closes form window...  I need something similar that I can include in the first field event method that does a refresh of the window (after setting the values)...  so I don't have to hit the refresh button to hide/show these fields... tried things like top.window.location.reload();..that doesn't work..  Graham



fli - Thursday, May 17, 2012 5:49 AM:

Hi Graham 

Maybe this can do it

var new = top.aras.saveItemEx(document.thisItem.node,false);

top.aras.uiReShowItemEx(document.itemID,new);

- Christoffer