Skip to main content

Notifications

Announcements

No record found.

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

  • Suggested answer
    mohamed bawath Profile Picture
    mohamed bawath 5 on at
    RE: Simple user prompt for a value in X++

    Here the Answer

  • MikeHefner Profile Picture
    MikeHefner 240 on at
    Re: Re: Re: Simple user prompt for a value in X++

     thank you

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: Re: Simple user prompt for a value in X++

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

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

     

     

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: Simple user prompt for a value in X++

     Hi,

     Use the dialog class:

     Simple example;

    Dialog d;

    DialogField df;

    d = new Dialog("My Dialog");

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

     

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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,622 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,354 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans