Hiba_t
23rd February 2006, 09:35
Hi all,
I need to write a script which will open baan sessions to a certain record..
I tried the following,
put.var( pid, field.name, field.value )
zoom.to$(session.name, Z.SESSION, "", "", 0)
And it worked for display sessions but I need it to work also for maintain sessions.. What should I do ?
Thanks,
Hiba
csecgn
23rd February 2006, 12:40
With Baan IV: On the first form from Maintain sessions you can set the first action for the session. Set it to 7 (find.data). In display sessions this action is default. Mostly thats all you need to do.
Regards
csecgn
Hiba_t
23rd February 2006, 12:43
Thanks but I don't want to have to do changes to the session I need to open..
csecgn
23rd February 2006, 12:49
Why? You don't have to edit the script. Its only the start parameter. And without the change (or editing the session-script) there is no way to tell the session to do that.
Regards
csecgn
lbencic
23rd February 2006, 16:34
If you are worried about modifying the standard component, maybe copy the session to a new number and change that option, then use that for your zoom...?
Hiba_t
24th February 2006, 09:50
The problem is that my script will get the session name as a parameter and so I can't do any change in the session to be opened since I don't know which one it is !!
sharma
24th February 2006, 13:21
In the script u can use skip.io("") function
Thanks
mark_h
24th February 2006, 15:31
The problem is that my script will get the session name as a parameter and so I can't do any change in the session to be opened since I don't know which one it is !!
I get it now - you are writing a program to call possibly any maintain sessions that are available. The problem is just like csecgn mentioned. So in your program you set the table fields and then when the zoom executes the display sessions execute a find. In order for this to work you have to change the "maintain sessions" with main tables that will be called. I see no way around setting the start option on the sessions. That may not also work for all maintain sessions.
You could always try setting the start option in ttadv200.sopt before you do the zoom.to. This may or may not work. I do not like this because it would impact all users.