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

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,827 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
    237,768 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
    237,768 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

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 704 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 408 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans