mostrightfuture
24th September 2004, 12:58
Hi all friends
Is there any possibility to customize a form (session), add one button or menu item on (entry or list session) and write own code on button press or menu click event?
Actuyll I want to call an external application on a user action (button press etc).
Thanks in advance
Mahmood
tools123
24th September 2004, 13:56
Sure.
you need to define additional button and link it a user choice.
you can then program in the script to call your external application.
Example:
choice.user.1:
after.choice:
Use form spec. options to define the user choice number and label.
malutz
24th September 2004, 13:57
Hej,
Yes forms can be customized so you can add your own buttons. A bit further down you'll find a code-fragment to start any application from baan.
The session for customizing forms is ttadv3500m000. In there you will find the option "Form-Commands".
|*
|* Pragma
|*
|DLL for Applikationstart
#pragma used dll "ottdllbw"
|This will Start the programm. The command can be any
|program, for example "winword"
retval = app_start(command, "", "", "", "")
Good luck. :D
mostrightfuture
28th September 2004, 10:42
Hi all friends
Thanks malutz & tools123 for your help.
Yes, one more thing, while defining the new command for form, there is one attribute as "Activate a" and possible options are
Session
Menu
Function
I selected "Function" because I dont want to launch another session or a menu item. Now, how I attach a function to that command? I have given a name of function while defining the form command and also written a function of the same name in the session script. When I run the session and press that command button to run the command it gives message that
"Function <Function Name> for this form specific command could not be found"
Thanks in advance
Mahmood
malutz
28th September 2004, 11:02
hej,
did you declare the function as extern?
function extern ....()
mostrightfuture
28th September 2004, 11:46
Hi,
Thanks malutz, its working well by defining the function as EXTERN.
Thanks again
Mahmood