
I have created action menu item in the properties I set enum parameter : summited and enum type parameter : Status. for this action menu item i created a button in form. in a class how can i write code when i click on action menu item button. the status should be change Draft to submit. And I have more than one record with same employee id in my form.
The topic of this thread is "creation of action menu item", therefore let me focus just on passing the parameter from the menu item to the class. If you want to discuss business logic need for the class, please create a new thread (with an appropriate title and tags) and explain the other problem there. Note that here you didn't even mention where is the status that you want to change.
To be able to call a class through a menu item, the class must have main() method:
public static void main(Args _args)
{
...
}
Notice that it receives an Args object as a parameter. This is where you can find input values, including the enum parameter defined on the menu item. For example:
if(_args.parmEnumType() == enumNum(MyEnum))
{
MyEnum myEnum = _args.parmEnum();
}