CRM has a nice feature (or at least a decent idea) called announcements which allows you to integrate and share textual messages with all CRM users.
The main issue with announcements is that the body or description field does not interprets hyper text.
Now wouldn’t it be nice to be able to integrate reach html messages into CRM using announcements. Although you can easily create your own reach text announcement mechanism and integrate it into CRM site map I actually find it more appealing leveraging an existing feature.
In order to force the announcement page support HTML is made a simple modification to the home / homepage / home_news.aspx. now, since modifying CRM files is unsupported consider the ramification before actually doing so.
The home_news.aspx page contains html that looks like this:
<body> <table width="100%" height="100%"> <tr> <td> <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td> <div style="width:100%;height:100%;overflow-y:scroll;padding:10px; border: 1px solid #cccccc; background-color:#ffffff;"> <table width="100%" height="100%" cellspacing="2" cellpadding="3" border="0" style="table-layout:fixed;"> <col width="20"><col> <% =RenderAnnouncements(false) %> <tr height="100%" colspan="2"><td> </td></tr> </table> </div> </td> </tr> </table> </td> </tr> </table> </body>
If you take a closer look at the generated html (using iedevtoolbar) you’ll notice that the announcement messages are rendered as table rows. I wanted to make as little change to this page as possible and still support HTML. In order to do so I used a simple technique which wraps the inner body content (table element) in a textarea and reads the textarea value into a new span element as innerHTML.
Here is how the page looks like after the modification is made:
<body> <textarea style="display:none" id="anntext"> <table width="100%" height="100%"> <tr> <td> <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td> <div style="width:100%;height:100%;overflow-y:scroll;padding:10px; border: 1px solid #cccccc; background-color:#ffffff;"> <table width="100%" height="100%" cellspacing="2" cellpadding="3" border="0" style="table-layout:fixed;"> <col width="20"><col> <% =RenderAnnouncements(false) %> <tr height="100%" colspan="2"><td> </td></tr> </table> </div> </td> </tr> </table> </td> </tr> </table> </textarea> <span id="annhtml"></span> <script> window.document.all.annhtml.innerHTML = document.all.anntext.value; </script> </body>
One thing that you need to minded of is that the html you paste in the announcement body should be a one liner. This is because the line breaks are interpreted as br elements.
That’s all, enjoy your new announcement feature.


8 comments:
I read your articles very excellent and the i agree our all points because all is very good information provided this through in the post. It is very helpful for me. Keep blogging like this. Thanks.
Oracle Fusion Financial Training Institute
What’s Happening i’m new to this, I stumbled upon this I’ve discovered It positively helpful and it has helped me out loads.
ccsu ba 2nd year result 2021
"CRM 4.0 is a game-changer for modern communication! Bringing announcements to life, it adds a new level of engagement that helps businesses connect with their audience more effectively and efficiently."
Digital Marketing Course In Hyderabad
Digital Marketing Course In Ameerpet
Power BI Classes Online
Power BI classes online are a convenient way to learn. This power bi classes page looks informative. The structure seems simple. Easy to follow. Helpful for learners.
Insightful share! dell boomi training
enables seamless connectivity between cloud and on-prem systems. Its scalable architecture and easy deployment make it a top choice for businesses aiming to streamline workflows and enhance performance.
Excellent article! Master devops online training
with our course, gaining practical knowledge in CI/CD, cloud operations, and automation tools to accelerate your IT career and efficiency.
Excellent article! Our devops with aws course
teaches automation, infrastructure as code, and continuous deployment with practical labs, helping professionals build real-world expertise quickly.
Power BI Online Training
I actually started learning Power BI a few months back using random free resources, but I felt like I was missing structure. While digging deeper, I came across this power bi online training. Haven’t enrolled yet, but it looks more organized compared to what I’ve tried so far.
Post a Comment