web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

creation of action menu item

(0) ShareShare
ReportReport
Posted on by 60

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.

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    237,976 Most Valuable Professional on at

    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();
    }

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 449 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 422 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans