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 :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

How to developing an alert on entity

(0) ShareShare
ReportReport
Posted on by 5

Hey guys,

I'm tried a few days to get solutions for my mission without success.

I need to develop an alert message without using Alert built in method on JavaScript.

It should be on Account entity when open a form.

The mission included.

Anyone know how to start it? Good tutorials are welcome!

Thanks a lot.

The mission:

On this task you have to add a JavaScript to the “Account” entity form so it will welcome you when you enter the account – On the OnLoad event of the page, show a form notification (not JavaScript alert) message with the text : “ Welcome <Name>!” Instead of the <Name> you should insert the name as it appears in the Account Name (schema name = name) of the account. For example: if the account name is “Adventure Works (sample)”, on entering the account the user will see a message “ Welcome Adventure Works (sample)!”

I have the same question (0)
  • Suggested answer
    meelamri Profile Picture
    13,218 User Group Leader on at

    Hi, 

    You need to use setformnotification function.

    Please refer to this blog for more details: 

    itsfascinating.com/.../

  • AvihayM6 Profile Picture
    5 on at

    Hey,

    It׳s OK, but I need the beginning steps from the Form properties till the publish.

    and how I can check that.

    Thanks

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi,

    Please follow the steps;

    1. Navigate to the Data->Tables->Account->Form->Account(for example), click the form and add form library.

    Addlibrary.png

    2. New a Web Resource and add it to your form libraries.

    5265.newwebresource.png

    pastedimage1628489281206v1.png

    pastedimage1628489298931v2.png

    3. Create a on load event and use that library.

    pastedimage1628489369773v3.png

    4. Save and publish the form. Then open the Sales Hub app and click one Account row, you will see the message.

    pastedimage1628489489592v4.png

    Sample JS:

    function formOnLoad(executionContext){
        var formContext = executionContext.getFormContext();
        var name = formContext.getAttribute("name").getValue();
        var message = "Welcome " + name + " !";
        Xrm.Navigation.openAlertDialog({ text: message});
    }

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 > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
11manish Profile Picture

11manish 176

#2
ManoVerse Profile Picture

ManoVerse 56 Super User 2026 Season 1

#3
Niki Patel Profile Picture

Niki Patel 42

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans