Announcements
No record found.
i want to call javascript function on ms crm home page load .
like , i want to display a message , hide a button etc
*This post is locked for comments
you can use this method to display the message.
Xrm.Page.ui.setFormNotification(message, level, uniqueId);
Parameter of Level defines how the message will be displayed.
What kind of button do you want to hide? Custom or OOB button?
What do you mean by home page? Starter page can be different for different users.
Hi Raju,
A . Which kind of message you want to display onload of form?
For error, information or warning message, you can use below code.
1. Xrm.Page.ui.setFormNotification("This is an INFORMATION notification.", "INFORMATION")
ok, thanks for your reply
my actual requirement is Display a notificationbar in sales activity dashboard onload
can you suggest me for that ...
thanks for your reply
I have done something similar in the past to set up a re-direct from a dashboard.
Create a new HTML webresource and put the following code into the Source tab:
<html><head><meta charset="utf-8"></head><body style="-ms-word-wrap: break-word;"> <script type="text/javascript">function redir() {alert("This system is no longer active. You will now be redirected");window.top.location.href="https://google.com";}redir();</script> <br></body></html>
You'll need to replace the redir() function with the alert you want.
Then simply add the HTMl resource as a component on the dashboard
Bharat
I have the same issue, can you share more details about how to use Enable/Display Rule ?
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.
Congratulations to our 2026 Super Stars!
Thanks to all of our 2025 Community Spotlight stars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Varsha deshpande 5
JS-09031509-0 3
Ciprian P 2