monica1
30th November 2005, 10:43
I have a session that call tfacrl504m00l. Then the users must to double click to open the specific record.
That I want is that directly from my session open tfacrl101s00l.


stpapi.put.field("tfacrl504m00l", "tfacr201.ttyp", tfacr201.ttyp)
stpapi.put.field("tfacrl504m00l", "tfacr201.ninv", str$(tfacr201.ninv))
stpapi.put.field("tfacrl504m00l", "tfacr201.recd", str$(cacmg004.recd))
ret = stpapi.find("tfacrl504m00l")
if ret = 1 then
stpapi.mark("tfacrl504m00l")
stpapi.synchronize.dialog("tfacrl504m00l", "display", error.msg)
endif
stpapi.end.session("tfacrl504m00l")


With this code don´t open the window of tfacrl101s00l. How can I open it in the specific record?

Thank you in advance,

en@frrom
30th November 2005, 12:57
AFS is used to run Baan sessions in the background, without user interface, i.e. no forms appear on the screen. If you want the user to actually see the form(s), then you should call the session (start.session etc) the regular way, not through afs.

darpan
14th December 2005, 14:52
Please Clarify the Problem hope i cn get you the exact solution

Darpan

monica1
14th December 2005, 17:12
The exactly problem is. I have a synchronizated session. I need to open the child session directly without see the parent session.

For example, I need to open the details of Sales Orders without see the list of all the Sales Order.

mark_h
15th December 2005, 16:23
As en stated - if you want to open a sub-session directly then just use something like activate. By using the main session with AFS the sub-session will be controlled by it and not your session. So you can always access the main session using AFS to find, check data or set some variables. But when you want to activate the sub-session use something like activate.

ssabaan
6th March 2006, 14:02
Use stppai.handle.subproc("main Session", "Sub Session",action) to call or open subsession.

action can be of 4 type -

Add
ignore
kill
Send


rest here is complete syntax

void stpapi.handle.subproc(string session, string sub.prog,
string action)
ARGUMENTS
session Name of the session this command is executed on.
sub.prog Baan ERP session code to which the action specified applies.
This must be the session code of a valid subsession of the
specified session or the menu code of a menu that can be
started by the specified session.
Action The action to be taken when the subsession starts or which
menu choice to be activated when the menu is activated.
Actions for subsessions:
�� kill - Child process is killed as soon as it starts
�� ignore - The child process is ignored except for the fact that the parent will
wait until the child ends
�� send - All future stpapi.* function calls that use the name of the parent act
on the child instead of the parent
�� add – The child is added to the list of sessions currently under control.
The child can thus be independently controlled by issuing stpapi.* function
directly against its session name
Menu choice:
�� Menu choice of the session to be started converted to a string