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)

Comment Box X++ Code

(0) ShareShare
ReportReport
Posted on by 354

Hi,

Am newbie to AX, Please suggest me some X++ code to generate dialog box as shown below.

Thanks in Advance.

Comment-Box.png

*This post is locked for comments

I have the same question (0)
  • Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    for a simple dialog box you can see examples here

    msdn.microsoft.com/.../aa877843.aspx

    theaxapta.blogspot.com/.../simple-dialog-box-in-axapta-2012.html

    you may use Notes (extended data type)

    dialogs can also be created via class.

    it depends what you are going to you and how you are going to do that.

  • Shyamraoo Profile Picture
    354 on at

    Thanks Sohaib, i have used Notes Extended Data type then i got something like this, But i need to change the Label text from note to comment and comment label should be placed on the top of the comment box.

    Please help on this.

    2015_2D00_06_2D00_17-13_5F00_28_5F00_53_2D002A20_Microsoft-Dynamics-AX_2C20_-_28000E202A20_2_2C2029000E20_.png

  • Verified answer
    Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    static void testDialog(Args _args)

    {

       dialog              dialog;

       dialogField         dialogField;

       ;

       dialog              = new Dialog("Any heading here whatever i want");

       dialogField      = dialog.addField(extendedTypeStr(Notes),"My Custom Label");

       if (dialog.run())    

       {

           info(strFmt("%1",dialogField.value()));

       }

    }

  • Verified answer
    Community Member Profile Picture
    on at

    Hi Shyamraoo,

    Hope this solution works for you.

    static void theAxapta_DialogBox(Args _args)

    {

       dialog              dialog;

       dialogField      dialogField;

       ;

       dialog                 = new Dialog("Comment:");

       dialogField         = dialog.addField(extendedTypeStr(Comments_JP));

       dialogField.showLabel(false);

       dialogField.displayHeight(8);

       if (dialog.run())

       {

           //your code to be executed if you click ok

       }

    }

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