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)

Simple user prompt for a value in X++

(0) ShareShare
ReportReport
Posted on by 240

If, in some X++ code, I need to quickly prompt the user for a value, a simple string if nothing else, what function should I use?  I suppose I’m looking for something akin to:

x = InputBox(“Type in something:”) in VB.

Just a simple function/method to prompt the user for a string value.  I realize that in finished polished production code that normally you'd have a form as an interface but a quick and dirty prompt asking the user to type something in still comes in handy sometimes.  X++ must have something like that, kind of the inverse of PRINT or info().

Please let me know if I asking this in the wrong forum.

Thanks in advance

*This post is locked for comments

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

     Hi,

     Use the dialog class:

     Simple example;

    Dialog d;

    DialogField df;

    d = new Dialog("My Dialog");

     df = d.addField(TypeID(yourEDT), "Enter Value");

     

  • Community Member Profile Picture
    on at

     Also, see this link for a more detailed example of Dialog:

    http://stackoverflow.com/questions/1702347/axapta-dialog-validation

     

     

  • MikeHefner Profile Picture
    240 on at

     thank you

  • Suggested answer
    mohamed bawath Profile Picture
    5 on at

    Here the Answer

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