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 :
Finance | Project Operations, Human Resources, ...
Answered

Align text and numbers in Box::Info() Ax2012

(0) ShareShare
ReportReport
Posted on by 46

HI All,

I am making a Info Box to display some total amounts on a selected production.

but...  I don't find the right way to display with a good/professional indent. Would be nice to be displayed more as a table since we are working with cost amounts

here the code example and box

pastedimage1620316104974v2.png pastedimage1620316208145v3.png

What would be the right way.. I am displaying and Box::Info Box::Stop Box::Warning depending on each scenareo 

Thanks a lot beforehand

I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    237,908 Most Valuable Professional on at

    I would say that the right way is using a dialog form. These boxes are not intended just for showing simple text.

  • Verified answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    I agree with Martin. Dialog forms provide you all the control that you need to format the output like you want. Box::info is intended for simple text output only (just like the infolog), it doesn't have much formatting options.

  • CBNestor Profile Picture
    46 on at

    Hi Martin,

    Thanks for replying and sorry that I am responding too late.. I have been working later on on this project.

    and I have created an HTML with the same info using <table></table> and its successfully sent by email. Like This:

    pastedimage1622033548592v1.png

    So I had the -maybe not that smart- idea of writing the same Html but in a custom Box as suggested by Sergei Here

    but.. It looks like this:

    pastedimage1622033810202v2.png

    I can see that the html is displaying but I am getting problems with this box margins/scrolling. kinda Ugly :)

    I am quite new with building Dialogs, can you give a little of hand with an example?

    remember that the rows and columns can change dynamically.. could be 3 o 4 columns , 5 or 20 rows...

    I am really appreciated beforehand for your help.

  • nmaenpaa Profile Picture
    101,160 Moderator on at

    Hi Nestor,

    you still seem to be creating this dialog via x++ code. Am I correct?

    Even if your dialog form would contain just one field with HTML, I suggest to create an actual form where you have much more control over various properties.

  • CBNestor Profile Picture
    46 on at

    Hi Nikolaos,

    Yes I am creating everything from x++.

    okok I'll try to create a form by AOT and see how it turns

  • Verified answer
    ergun sahin Profile Picture
    8,826 Moderator on at

    You can use dialog

    docs.microsoft.com/.../using-classes-to-create-a-dialog

    or form with runtime controls

    www.axaptapedia.com/Runtime_form_controls

  • Suggested answer
    ergun sahin Profile Picture
    8,826 Moderator on at

    If you want use that html you can look for tutorial_Form_Controls's html tab

  • CBNestor Profile Picture
    46 on at

    HI Nikolaos,

    fast question

    Here I just created a simple Form from AOT with a HTML field.

    I can open it, but..

    How Can I write Html to it from x++?..

    pastedimage1622038223924v1.png

  • Suggested answer
    ergun sahin Profile Picture
    8,826 Moderator on at

    Send html with args.parm or args.parmObject and at form's init method set value with Html.setText("");

  • CBNestor Profile Picture
    46 on at

    Ergun, you are too fast my friend. Can you detail a bit more please.

    I understand for you is pretty simple but I have never tried to write into forms from x++

    args.param() and args.paramObject(); are returning null.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 544 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans