Notifications
Announcements
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
I have the same issue, can you share more details about how to use Enable/Display Rule ?
Hi Raju,
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
thanks for your reply
my actual requirement is Display a notificationbar in sales activity dashboard onload
can you suggest me for that ...
ok, thanks for your reply
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")
What do you mean by home page? Starter page can be different for different users.
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?
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Shidin Haridas 2
Abdullah13 1