Tuesday, December 24, 2013

Google News Plugin For Salesforce


There is a easy plugin to add google news in visualforce pages,PLease use the following

<iframe frameborder="0" height="90" marginheight="0" marginwidth="0" src="https://www.google.com/uds/modules/elements/newsshow/iframe.html?q=YourKeyWord&amp;#38;rsz=small&amp;#38;format=728x90" width="728">
</iframe>

example

<iframe frameborder="0" height="90" marginheight="0" marginwidth="0" src="https://www.google.com/uds/modules/elements/newsshow/iframe.html?q=salesforce.com&amp;#38;rsz=small&amp;#38;format=728x90" width="728">
</iframe>

check out the demo here

Tuesday, December 3, 2013

Embedding Attachments in visualforce page

Sometimes we need to embedd some files in visualforce pages(like invoice bills,etc). I got into same requirement to display a memo in visualforce page.
For that what I did is :

1) I let the users to add the memo to salesforce

2) I inserted the memo into attachments object

3) Then I quried the memo for the particular record.

4) Displayed the file by embedding inside visualforce page..

How to embed the attachment in visualforce page????

I tried this way,
By using the <OBJECT> and <EMBED> tags

<object data ="/servlet/servlet.Filedownload?file={!theattachmentid}" type="application/pdf" width="100%" height="500px">
<embed src ="/servlet/servlet.Filedownload?file={!theattachmentid}" width="100%" height="500px"/>
</object>

Adding Account Team related list in visualforce page

To add the account team related list in visualforce page.
<apex:relatedList list="AccountTeamMembers"/>