Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

A Form to accept data and store in a table

(0) ShareShare
ReportReport
Posted on by

I have a scenario that A form having a button when clicked on it a dialog is prompted to accept values and when clicked on OK button it should store the entered data in a table. Please suggest me how to do it.

Thanks

Harry

*This post is locked for comments

  • Verified answer
    Chaitanya Golla Profile Picture
    17,225 on at
    RE: A Form to accept data and store in a table

    Hi,

    Create a simple dialog through x++ code in the clicked method of your button(as suggested by Visvash and Dinkar) through following code.Declare tableName variable and insert/update the data in the table, make a call to datasource executequery method to get the latest data.

    {
    dialog              dialog;
    dialogGroup    dialogGroup;
    dialogField      dialogField;
    tableName        tableNamelocal;
    ;
    
    dialog              = new Dialog("Dialog");
    dialogGroup    = dialog.addGroup("Customer"); // I used customer in the lookup, you can specify yours
    dialogField      = dialog.addField(extendedTypeStr(custAccount));
    if (dialog.run())
    {
       tableNamelocal.field1 = dialogField.value();
       tableNamelocal.write();
    }
    }
    
    tablename_ds.executequery();
    }
  • Suggested answer
    startax Profile Picture
    1,845 on at
    RE: A Form to accept data and store in a table

    Hi Harry,

    Create a simple dialog form (Either AOT form or dialog class) On button click from parent form open your child form and enter data and ok button in child form insert data in table.

  • Suggested answer
    Rohin Profile Picture
    4,624 on at
    RE: A Form to accept data and store in a table

    Looks like, Its already been in AX. See salesOrder Creation or purchase order creation, when you click on new button , it prompt new form(not dialog like you said in your case) where you enter some data in fields and then click OK on new form and it will create data or store data in salesTable/PurchTable.

     please let us know about your requirement with more details.

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 100 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 50

#3
shanawaz davood basha Profile Picture

shanawaz davood basha 6

Featured topics

Product updates

Dynamics 365 release plans