What are you all speaking about? :roll:
There are may be some possibilites to do this!
And first of all - use reference type!
If you have one table linked to another, you do not need to write any line of code
//Get the name of the menu item in the Action table that we will use
//to launch the form.
menuItemName = aifEndpointActionPolicy.displayMenuItemName();
//Create a new menu function based on the menu item name
menuFunction = new MenuFunction(menuItemName, MenuItemType::Display);
//create a populate the arguments that will be passed to the form
args = new Args();
args.caller(this);
args.record(aifEndpointActionPolicy);
//Create the form from the menu function
configForm = menuFunction.create(args);
if(configForm)
//Run the form
configForm.run();
else
//Menu item does not exist
throw error(strfmt("@SYS55489", menuItemName));
***
//Get the name of the menu item in the Action table that we will use
//to launch the form.
menuItemName = aifEndpointActionPolicy.displayMenuItemName();
//Create a new menu function based on the menu item name
menuFunction = new MenuFunction(menuItemName, MenuItemType::Display);
//create a populate the arguments that will be passed to the form
args = new Args();
args.caller(this);
args.record(aifEndpointActionPolicy);
//Create the form from the menu function
configForm = menuFunction.create(args);
if(configForm)
//Run the form
configForm.run();
else
//Menu item does not exist
throw error(strfmt("@SYS55489", menuItemName));
***
Thanks a lot for the coding help.
Your sharing is much appreciated.
Comments
"xx " is the no. (ID) of the form u want 2 open.
There are may be some possibilites to do this!
And first of all - use reference type!
If you have one table linked to another, you do not need to write any line of code
***
MenuItemNameDisplay menuItemName;
MenuFunction menuFunction;
FormRun configForm;
Args args;
;
//Get the name of the menu item in the Action table that we will use
//to launch the form.
menuItemName = aifEndpointActionPolicy.displayMenuItemName();
//Create a new menu function based on the menu item name
menuFunction = new MenuFunction(menuItemName, MenuItemType::Display);
//create a populate the arguments that will be passed to the form
args = new Args();
args.caller(this);
args.record(aifEndpointActionPolicy);
//Create the form from the menu function
configForm = menuFunction.create(args);
if(configForm)
//Run the form
configForm.run();
else
//Menu item does not exist
throw error(strfmt("@SYS55489", menuItemName));
***
If you want to call directly to the form:
If you want (and you can) call to a MenuItem (recommended), do that way:
Hope this helps.
http://www.jaestevan.com (AX Dev Blog)
http://twitter.com/jaestevan (follow me!)
Your sharing is much appreciated.