Posts Tagged twtr
Twitter for Microsoft Dynamics CRM 2011
Posted by Purush in Customization, Dynamics CRM 2011, HTML, Jscripts, Microsoft dynamics CRM 2011 on May 4, 2012
Add the Following Code to your Dynamics CRM web resource as a HTML.
Add a Web resource To your Target Entity Form, In the Web Resource Put the HTML as the Source then Define its location and size on then Form.
Finally save and publish the Customization.
<HTML style=”HEIGHT: 100%”>
<HEAD><TITLE></TITLE><META charset=utf-8></HEAD>
<BODY>
<SCRIPT src=”https://widgets.twimg.com/j/2/widget.js”></SCRIPT> //Twitter Source URL
<SCRIPT>
var twt = window.location.search.substr(6);
if (twt == ” “) twt = “name“;
//Defining the Variables and Passing the CRM Field
var twitterSearch = window.parent.Xrm.Page.data.entity.attributes.get(twt).getValue();
new TWTR.Widget({
version: 2,type: ‘search’,search: twitterSearch,interval: 6000,title: ‘Twitter Feeds‘,subject: ”,width: ‘100%’,height: ‘100%’,
//Twitter Definition
theme:
{ shell: {background: ‘#8ec1da’,color: ‘#ffffff’}, tweets: {background: ‘#ffffff’,color: ‘#444444’,links: ‘#1985b5’}
},
features: {scrollbar: false,loop: true,live: true,hashtags: false,timestamp: true,avatars: true,toptweets: true,behavior: ‘default’}
}).render().start();
</SCRIPT>
</DIV>
</BODY>
</HTML>
The Same code can be reused for several System and Custom Entities with Just replacing the Field name with Respective Entities Search Field in the Beginning for the Code.
Find Twitter API For Additional Enhancements