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

Announcements

No record found.

News and Announcements icon
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,286 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Sagar Suman Profile Picture

Sagar Suman 2 Super User 2026 Season 1

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans