Answered by:
How to scroll announcements on the top of the home page?

Question
-
Dear All,
I want to scroll the announcements on the top of the home page of the CRM (like we usually find in some of the websites)for all the users according to the expirydate. Please guid me where to start..Sunday, May 24, 2009 6:43 AM
Answers
-
Hi Nag,
Here are the steps to scroll announcement on CRM Home page. Kindly note that I do not take any responsibility if something goes wrong with this approach.
1. Go to CRMWeb\_root\ and take backup of bar_top.aspx and keep it safe somewhere. In case things goes wrong, you will need it to restore things back.
2. Open bar_top.aspx in Visual Studio
3. Add the following code snippet at the end of the file.
<!-- SCRIPT BEGIN : Scroll Announcements --> <script type="text/javascript" language="javascript"> window.attachEvent('onload', ScrollAnnouncement); function ScrollAnnouncement() { var xml = "" + "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">" + GenerateAuthenticationHeader() + " <soap:Body>" + " <Execute xmlns=\"http://schemas.microsoft.com/crm/2007/WebServices\">" + " <Request xsi:type=\"RetrieveMultipleRequest\" ReturnDynamicEntities=\"true\">" + " <Query xmlns:q1=\"http://schemas.microsoft.com/crm/2006/Query\" xsi:type=\"q1:QueryExpression\">" + " <q1:EntityName>businessunitnewsarticle</q1:EntityName>" + " <q1:ColumnSet xsi:type=\"q1:ColumnSet\">" + " <q1:Attributes>" + " <q1:Attribute>articletitle</q1:Attribute>" + " </q1:Attributes>" + " </q1:ColumnSet>" + " <q1:Distinct>false</q1:Distinct>" + " </Query>" + " </Request>" + " </Execute>" + " </soap:Body>" + "</soap:Envelope>" + ""; var xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP"); xmlHttpRequest.Open("POST", "/mscrmservices/2007/CrmService.asmx", false); xmlHttpRequest.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/crm/2007/WebServices/Execute"); xmlHttpRequest.setRequestHeader("Content-Type", "text/xml; charset=utf-8"); xmlHttpRequest.setRequestHeader("Content-Length", xml.length); xmlHttpRequest.send(xml); var resultXml = xmlHttpRequest.responseXML; var entityNode = resultXml.selectNodes("//BusinessEntities")[0]; var marqueeHTML = "<marquee class='ms-crm-MastHead-SignIn-User'>"; for (var i = 0; i < entityNode.childNodes.length; i++) { if (i == 0) { marqueeHTML += entityNode.childNodes[i].childNodes[0].childNodes[0].text } else { marqueeHTML += " | " + entityNode.childNodes[i].childNodes[0].childNodes[0].text; } } marqueeHTML += "<marquee>"; var headerTD = document.getElementById("tdLogoMastHeadBar"); headerTD.innerHTML += marqueeHTML; } </script> <!-- SCRIPT END : Scroll Announcements -->
5. Check on home page.
You will see a scrolling marquee of the announcements title on CRM Header.
Also you might wanna look at the marquee tag to control the behavior, speed and other parameters.
Regards,
Chinmay
http://metrix.blogspot.com- Proposed as answer by Chinmay Patel Monday, June 1, 2009 4:18 PM
- Marked as answer by DavidJennawayMVP, Moderator Monday, June 8, 2009 6:00 AM
Monday, June 1, 2009 4:16 PM
All replies
-
You need to export the sitemap.xml, then edit it:
find the string:
<SubArea Id="nav_news" Entity="businessunitnewsarticle" Url="/home/homepage/home_news.aspx" DescriptionResourceId="News_SubArea_Description" />
then move it just under the:
<Group Id="MyWork" ResourceId="Group_MyWork" DescriptionResourceId="My_Work_Description">
finally save and import it to CRM.
Hope it helps.
Jim
Jim Wang - MVP Dynamics CRM - http://jianwang.blogspot.com , http://mscrm.cn- Proposed as answer by Jim Wang (Microsoft)Microsoft employee, Moderator Sunday, May 24, 2009 9:27 AM
Sunday, May 24, 2009 9:26 AMModerator -
Hi Jim Wang,
Thanks for the reply !
My actual requirement is to scroll the announcements on the top of the page (Between Logo & User Name).
I would appreciate if anyone could suggest a simple and quick way !
BR,
Nag.Monday, May 25, 2009 5:54 AM -
Hi Nag,That would require a change to the default MS CRM User Interface (web pages) and would not be a supported customization. This will cause you problems when you need to upgrade from v4 to v5.I would recommend against making the change.Hassan.
Hassan Hussain | http://hassanhussain.wordpress.com/Tuesday, May 26, 2009 8:13 AM -
Hi Nagcrm,
If you are not worried about supported/unsupported solution then you can easily do it. If you tell me what kind of announcements you want to scroll, I can help you with this.
Regards,
Chinmay
Tuesday, May 26, 2009 9:36 AM -
Hi Chinmay,
Thanks for reply ! Whatever admin entered announcements those should scroll on the top of the page. this will notify the users quickly !
BR,
Nag.Wednesday, May 27, 2009 10:55 AM -
Hi Nag,
Here are the steps to scroll announcement on CRM Home page. Kindly note that I do not take any responsibility if something goes wrong with this approach.
1. Go to CRMWeb\_root\ and take backup of bar_top.aspx and keep it safe somewhere. In case things goes wrong, you will need it to restore things back.
2. Open bar_top.aspx in Visual Studio
3. Add the following code snippet at the end of the file.
<!-- SCRIPT BEGIN : Scroll Announcements --> <script type="text/javascript" language="javascript"> window.attachEvent('onload', ScrollAnnouncement); function ScrollAnnouncement() { var xml = "" + "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">" + GenerateAuthenticationHeader() + " <soap:Body>" + " <Execute xmlns=\"http://schemas.microsoft.com/crm/2007/WebServices\">" + " <Request xsi:type=\"RetrieveMultipleRequest\" ReturnDynamicEntities=\"true\">" + " <Query xmlns:q1=\"http://schemas.microsoft.com/crm/2006/Query\" xsi:type=\"q1:QueryExpression\">" + " <q1:EntityName>businessunitnewsarticle</q1:EntityName>" + " <q1:ColumnSet xsi:type=\"q1:ColumnSet\">" + " <q1:Attributes>" + " <q1:Attribute>articletitle</q1:Attribute>" + " </q1:Attributes>" + " </q1:ColumnSet>" + " <q1:Distinct>false</q1:Distinct>" + " </Query>" + " </Request>" + " </Execute>" + " </soap:Body>" + "</soap:Envelope>" + ""; var xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP"); xmlHttpRequest.Open("POST", "/mscrmservices/2007/CrmService.asmx", false); xmlHttpRequest.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/crm/2007/WebServices/Execute"); xmlHttpRequest.setRequestHeader("Content-Type", "text/xml; charset=utf-8"); xmlHttpRequest.setRequestHeader("Content-Length", xml.length); xmlHttpRequest.send(xml); var resultXml = xmlHttpRequest.responseXML; var entityNode = resultXml.selectNodes("//BusinessEntities")[0]; var marqueeHTML = "<marquee class='ms-crm-MastHead-SignIn-User'>"; for (var i = 0; i < entityNode.childNodes.length; i++) { if (i == 0) { marqueeHTML += entityNode.childNodes[i].childNodes[0].childNodes[0].text } else { marqueeHTML += " | " + entityNode.childNodes[i].childNodes[0].childNodes[0].text; } } marqueeHTML += "<marquee>"; var headerTD = document.getElementById("tdLogoMastHeadBar"); headerTD.innerHTML += marqueeHTML; } </script> <!-- SCRIPT END : Scroll Announcements -->
5. Check on home page.
You will see a scrolling marquee of the announcements title on CRM Header.
Also you might wanna look at the marquee tag to control the behavior, speed and other parameters.
Regards,
Chinmay
http://metrix.blogspot.com- Proposed as answer by Chinmay Patel Monday, June 1, 2009 4:18 PM
- Marked as answer by DavidJennawayMVP, Moderator Monday, June 8, 2009 6:00 AM
Monday, June 1, 2009 4:16 PM