web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
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 456

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,095 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
    456 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
    456 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,095 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
    456 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
    456 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 653

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 501 Super User 2026 Season 1

#3
CP04-islander Profile Picture

CP04-islander 298

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans