Running App with parameters from the MENU

I need to use this MACRO to open a FORM from the MENU in “Insert New Record” mode.

sc_apl_conf(“my_form”, “start”, “new”);

There are no really any embed points (events) to be able to control when the menu selection is made. How can I call this form from the menu ?

Art

Hi Arthur,
You can add below code in ‘OnExecute’ event in menu application. Item number can be found under properties of each menu item. If the item no is 38 then code will look like below;

if ({sc_menu_item} == “item_38”)
{
sc_apl_conf(“my_form”, “start”, “new”);
}

Hope this helps.
Cheers,
Aari

Yes it is. Saari told you how.

OK, I thought “OnExecute” event applies to the whole Menu (not the menu item). they should change the event name to something like " OnExecItem" - it would be much more descriptive.

Thanks - ARTHUR

The menu item reads number 15. I placed this code but when I click the menu selection nothing happens. what am I missing ?

if ({sc_menu_item} == "item_15")
{
sc_apl_conf("form_t_newtc_4co", "insert", "on");
}

If you are inserting a new record then how about using “start”, “new” parameters instead of “insert”, “on”

I tried that as well. Clicking on the menu item simply has no results at all

Hmm I am not sure. It is working for me and my version is 8.1. Could it be a security issue? Is the user has access to ‘Insert’? But if it is that you will receive an ‘Unauthorised User’ message.

at this moment the whole Security is disabled

OK, I’m stuck here. Could somebody please confirm if this macro is working and if there are any extra steps necessary to make it work (except inserting the code above) into “OnExecute” event ?

Aari, Thanks! This is just what I needed. Worked great, well after I fixed a typo in my form name.
Thanks again,
Bill

ada, the code worked as is for me. All I did was use the correct item_# and my form name. I hope you find the issue.