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 :
Microsoft Dynamics AX (Archived)

creating form through x++

(0) ShareShare
ReportReport
Posted on by

hi,

i need to create form with one enum based on the selection change i need to do some  operation

how to do that..

i have tried using formcomboboxcontrol..but when i access the selectionchange using control object ..the ax running stopped 

..

how to resolve this..

thanks in advance

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    Dont use selectionchange use modifiedfield method.

  • Community Member Profile Picture
    on at

    hi,

    this is my code ..where i need to done this (on changing the selection i need to get the record count)

    static void Job101(Args _args)

    {

       Form                    form;

       FormRun                 formRun;

       Args                    args;

       FormBuildDesign         formBuildDesign;

       FormBuildControl        formBuildControl;

       FormBuildTabControl     formBuildTabControl;

       FormBuildTabPageControl formBuildTabPageControl;

       FormBuildGridControl    formBuildGridControl;

       FormBuildDatasource     formBuildDatasource;

       FormBuildStringControl  formString;

       FormComboBoxControl     comboBox;

       form = new Form();

       formBuildDesign = form.addDesign('design');

       comboBox = formBuildDesign.addControl(FormControlType::ComboBox,'Enum');

       comboBox.enumType(enumNum(NKDept));

       args    = new Args();

       args.object(form);

       formRun = classFactory.formRunClass(args);

       formRun.init();

       formRun.run();

       formRun.wait();

    }

  • Mea_ Profile Picture
    60,284 on at

    It's a bad idea to create form from code, instead build form in AOT with all required controls and methods and then invoice it where you need it.

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans