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 :
Customer experience | Sales, Customer Insights,...
Suggested Answer

How to make alert/warning appear on form?

(0) ShareShare
ReportReport
Posted on by 10

Hi all, 

Hope this is the correct place to post this. 

I need to get a message alert on a form when a certain field equals yes. This field is a yes/no field with values 0 and 1. 

So basically when the field is set to yes then the message needs to appear for the user. 

I have tried implementing some Javascript onto the field properties as an OnChange event but this does not seem to work. Here is the JS I used - 

function WarningMessage() {

if ($("#ggh_potentialconflict").attr() == "1" {
alert("The Account has a potential problem!");
}

}

Is there a way I can do this without Javascript? Otherwise please let me know if I might be doing something wrong. 

Thank you for any help. 

I have the same question (0)
  • Ray Profile Picture
    1,537 on at

    Business Rule can Validate data and show error messages not sure if this can solve your requirement.

    If you want to do it with Javascript, I think you should follow Xrm object model design. It is an unsupport way to access Dom directly. There is an openAlertDialog function to show alert.

  • Suggested answer
    Bipin D365 Profile Picture
    28,985 Moderator on at

    Hi,

    You should be using SetFormNotification in CRM Dynamics to show warnings on the form.

    itsfascinating.com/.../

  • Tamilarasu Arunachalam Profile Picture
    593 on at

    for notification

    formContext.ui.setFormNotification("Text to notify","WARNING","id");

    for alert
    Xrm.Utility.alertDialog("message", null);

    Regards,

    Tamilarasu Arunachalam

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 > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 180 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 123

#3
CU11031447-0 Profile Picture

CU11031447-0 100

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans