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

How to Change the Text color of Dialog Box

(0) ShareShare
ReportReport
Posted on by 454

Hi,

I have to Change the color of the Text in the Dialog Box,Instead of Black color Text it should be in Red Color. Any Suggestions please .

DialogTextcolor.png

Regards,

Ram.

I have the same question (0)
  • Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hi Ram,

    Is that really necessary?

    What value do you add by doing that?

    Best regards,

    Ludwig

  • Suggested answer
    Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Ram,

    I share the view of Ludwig.

    But in case if you really need it you can take a look how Box::yesYesAllNoCancel method is designed. The text can be html and you can try to change color with html tags.

  • Ram Kumar Profile Picture
    454 on at

    Hi Sergei,

    I have seen the Box Class. But i don't know how to change the text color property there.

    Regards,

    Ram.

  • Suggested answer
    Crispin John Augustine Profile Picture
    37,081 on at

    In addition to my suggestion in your related poast community.dynamics.com/.../how-to-modify-a-confirm-deletion-message

    You have to develop a popup form with "Always on top" property. Here you can play with graphics.

    Your options with Box::**** are limited.

  • Ram Kumar Profile Picture
    454 on at

    Hi Crispin,

    Can You Elaborate in detail. Since i am new to AX.How to do all those things you have mentioned.

    Regards,

    Ram.

  • Crispin John Augustine Profile Picture
    37,081 on at

    Instead of the line of code where you use Box::***

    you have to call a menuitem of a form.

    To start with, create a form, set design property "Always on top" yes.  

    Add a text/label and set it's font/format from the properties.

    Then create a menuitem for the form.

  • Verified answer
    Sergei Minozhenko Profile Picture
    23,093 on at

    Hi,

    Just make a copy of yesYesAllNoCancel method from Box class with a minor change like below.

    public client static DialogButton yesNoTest(
        str             _text,
        DialogButton    _defaultButton,
        str             _title = "@SYS11132",
        boolean         _modal = false)
    {
        Args    args;
        Object  formRunObj;
        FormRun formRun;
        ;
        args = new Args();
        args.name(formstr(SysBoxForm));
        formRun = classfactory.formRunClass(args);
        formRun.init();
        formRunObj = formRun;
        formRunObj.setTitle(_title);
        formRunObj.setText(_text, false);
        formRunObj.setType(DialogBoxType::YesNoBox);
        formRunObj.parmDefaultButton(_defaultButton);
        formRun.run();
        formRun.wait(_modal);
        return formRunObj.dialogButton();
    }

    And test it with code:

    Box::yesNoTest('

    This is a red text

    ', DialogButton::Yes);

  • Ram Kumar Profile Picture
    454 on at

    Hi Crispin,

    I have Created a form with property 'always on top' to yes. Where Should i add the Condition Text .

    Regards,

    Ram.

  • Crispin John Augustine Profile Picture
    37,081 on at

    Design>>new control>>Static text (for example)

    Once you added the text, you can set it's font, from the properties

  • Ram Kumar Profile Picture
    454 on at

    Hi Crispin,

    Yeah i have added the text should i add yes and No buttons there manually.

    Regards,

    Ram

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