Londonsangel
23rd July 2012, 11:10
Hi there, I know this is probably something simple that I just cannot figure out, but I am quite new to Baan development, and I can't seem to figure this one out...

I have one session 1(Maintain Master Tool Set), from here is a button that opens a session 2(Maintain Master Tool Set Components).

What happens is that one session 1, i have a few fields with values 0 for each, when you go into session 2, you can go and mark some components as damaged, session 1 stays open in the background, when you save and exit session 2, i would like session 1 to stay on that record, but to refresh the form automatically, so that the value of 0, now shows 1 ... or however many components you went and marked as damaged. How can i do this? At the moment the user will have to go back to session 1 and use Edit - Refresh. which we dont really want.

thanks
angie

zardoz
23rd July 2012, 12:45
Try this, in the session 1:

choice.zoom:
....
after.zoom:
execute(find.data) |*refresh

Londonsangel
23rd July 2012, 14:42
Thanks so much for replying, in the choice section i put this:

choice.zoom:
after.choice:
execute(find.data)

would not work with the after.zoom part... but this is still not refreshing my session 1 :confused:

Am i doing this wrong?

My session names are:
Session1:tisfcc810m000
Session2:tisfcc812m000

BaanInOhio
23rd July 2012, 15:31
In the called (child) session's script, add a call to refresh the parent session. The single argument is for the occurrance to refresh in the parent session. Use '-1' when all parent occurrances are to be refreshed.

after.program:
ret = refresh.parent(-1)

Londonsangel
23rd July 2012, 15:52
Tried, am now getting the error "Unresolved reference to function 'refresh.parent', something i need to add in my declarations perhaps?

zardoz
23rd July 2012, 16:50
How is called the zoom session from session 1?
My hint works if the session is called with choice.zoom (zoom on choice field in the form)
If the session is zoomed in other way, by zoom.to$ by example, you have to put the execute(find.data) immediatly after this call...
If the zoom is from field, you have to put in the section after.zoom of the field...

BaanInOhio
23rd July 2012, 21:47
Tried, am now getting the error "Unresolved reference to function 'refresh.parent', something i need to add in my declarations perhaps?

Nope. I didn't look at your profile close enough. Only available in LN. In 4c, you will have to do the refresh manually after the zoom event (either choice or field) as covered in other replies.

Londonsangel
24th July 2012, 07:52
Thanks so much everyone for your help :) Zardoz that did it!!! Very happy now...