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

Warning message is not displaying even if it reads the message.

(0) ShareShare
ReportReport
Posted on by 534

Hi Guys,

I need to display the warning message. when I debugged it is reading the warning but it is not displaying the message.

but when I tried this in runnable class it is working fine.

Example -

warning(strFmt("%1", ID));

Note - Throw warning is working, but without "throw" keyword it is not working. 

I have the same question (0)
  • Verified answer
    GirishS Profile Picture
    27,833 Moderator on at

    Hi jenifer,

    You need to use throw keyword to throw an exception during the process execution.

    But try using Message class to throw warning.

    Message::Add(MessageSeverity::Warning,"Warning message");

    Thanks,

    Girish S.

  • Adam123 Profile Picture
    534 on at

    Is there is any way that I can populate the warning message without stopping the process, if I use throw it will stop the process.

  • Adam123 Profile Picture
    534 on at

    Hi Girish

    I have tried this but it is not working.

  • Martin Dráb Profile Picture
    238,782 Most Valuable Professional on at

    Please give us more information about your situation.

    You said it's working fine in a runnable class, but not at the place where you need it. What is the place? Isn't it called from a method that removes messages added to infolog?

  • Adam123 Profile Picture
    534 on at

    Hi Martin,

    In form clicked method I am calling one class static method , inside this static method I am writing this warning.

  • Verified answer
    Martin Dráb Profile Picture
    238,782 Most Valuable Professional on at

    I don't know what you have in ID variable, so let me simplify it. Please let me know if the following correctly describes steps to reproduce your problem.

    1. Create a new class with a static method containing a call of warning() method. Like this:

    internal final class MyWarningTest
    {
        internal static void showMessage()
        {
            warning("Test message");
        }
    }

    2. Create a new form, add a button, override its clicked() and call the previously defined method there.

    3. Build the solution, run the form and press the button.

    Result: The message isn't shown in infolog.

    Please try it. I'm assuming you'll see the message, which would mean that you didn't give us correct information about your actual scenario.

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
André Arnaud de Calavon Profile Picture

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

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 390

#3
Adis Profile Picture

Adis 266 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans