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
my actual requirement is Display a notificationbar in sales activity dashboard onload
can you suggest me for that ...
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")
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?
André Arnaud de Cal...
292,074
Super User 2025 Season 1
Martin Dráb
230,900
Most Valuable Professional
nmaenpaa
101,156