Web 2.0 is a cool feature in Oracle CRM On Demand, One can easily plugin various portals into the application. Have you ever came across a requirement where you wanted a mash-up of the Twitter RSS Feed inside Oracle CRM On Demand ? Then you have come to the right page!
For example if you want to display the contact's twitter feed in the Contact Detail Page, you can do it very easily ! Below I have explained how one can do this, in a few simple steps.
1) Navigate to Admin > Application Customization > Record Type Setup > Contact > Contact Field Setup. Then add a new field in “Twitter Id” of type Text (short). Below is a screenshot.
2) Now navigate to Admin > Application Customization > Record Type Setup > Contact > Contact Page Layout > Expose this field on the page layout. Click on Finish button to save the layout. The twitter Id field should be now visible in the contact detail page.
3) Now you will need a Twitter RSS Feed Widget. There are a number of twitter widgets available on the internet. I tried this one http://twitter.com/about/resources/widgets/widget_profile. Very simple to generate widget JavaScript code. And you can do it quickly !. Here is how you do it.
a) Enter a Twitter Id to generate the widget code.
b) You can set various preferences as shown below
c) Set the widget color preferences that suit your CRM On Demand Theme. You can quickly grab the theme colors from Admin > Application Customization> Themes > Your CRMOD Theme
d) Click on Test Settings button to preview your Twitter RSS widget
e) Set the widget width as necessary. I have selected auto width.
f) Click on the Finish & Grab Code button. Now you will be able to see the widget JavaScript code.
g) Copy and paste the code into a text file. And keep it aside. I have pasted the JavaScript code generated here below.
<script src="http://widgets.twimg.com/j/2/widget.js"></script>
<script>
new TWTR.Widget({
version: 2,
type: 'profile',
rpp: 5,
interval: 6000,
width: 'auto',
height: 300,
theme: {
shell: {
background: '#ffe27a',
color: '#000000'
},
tweets: {
background: '#ebfaff',
color: '#000000',
links: '#2207eb'
}
},
features: {
scrollbar: false,
loop: false,
live: false,
hashtags: true,
timestamp: true,
avatars: false,
behavior: 'all'
}
}).render().setUser('dharmasagar').start();
</script>
4) Now navigate to Admin > Application Customization > Record Type Setup > Contact > Contact Web Applet. Create a new contact web applet of type HTML, set the location to Detail Page, Set the contact field to “Twitter Id”. Cut paste the generated Twitter Id field and keep it aside.
5) Replace the below line in the widget JavaScript code as shown below.
render().setUser('dharmasagar').start();
to
render().setUser(' %%%stTwitter_Id%%%').start();
6) Paste the widget code generated above into the Web Applet HTML Section and save the web applet.
7) Now navigate to a contact record, and in the Contact Detail Page, add the twitter section, by clicking on the edit layout link.
8) Update the Twitter Id field in the Contact Detail Page, and refresh the screen. You should be able to see the twitter feeds in the Twitter RSS Feed section below. That’s it and you are done! Below is a screen shot of how it looks like :)
Hope you enjoyed reading through! And I hope you will found this article useful as well :)
Do share your comments below. Happy Coding :)!
Do like us on our Facebook Page: