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)

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

I have the same question (0)
  • Suggested answer
    Rohin Profile Picture
    4,624 on at

    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.

  • Suggested answer
    startax Profile Picture
    1,845 on at

    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.

  • Verified answer
    Chaitanya Golla Profile Picture
    17,225 on at

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

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans