877.703.4488 info@cloudmybiz.com

If you’ve been following our posts, you know that we at CloudMyBiz are big fans of leveraging images to tell stories about your Salesforce data. Image formulas are an incredible tool, but they have some limitations. You have to have a field name, so you can’t just have the image nicely displayed on its own. There are limits to the number of formula fields you can use on an object, and image formulas can quickly be a drain on these. Additionally, if you want to put something in there which is a little more dynamic than an image, say a web page, well, that’s never going to happen.

As a blog coordinator, I wanted a way to easily track my blogs, keep an eye on posts, and have a really dynamic, nice looking page to work with in Salesforce.  Image formulas weren’t going to do the trick, so I sat back, pulled up a new Visualforce page, and wrote this in just 15 minutes (including adding it to my page layout)! The code couldn’t be simpler, and you can have a gorgeous addition to your page that will tell a story like nothing else in no time.

<apex:page standardController="Blog__c" showHeader="false" sidebar="false" >
<apex:outputLink value="{!Blog__c.bLocation__c}" target="_blank">
<apex:image url="{!Blog__c.imageURL}"/>

Note that you can hard code a specific URL or make it a bit more dynamic like I did here with a URL formula. You can even take this one step further and drop an iFrame straight on to your page.

<apex:page standardController="Blog__c" showHeader="false" sidebar="false" >
<apex:iframe src="{!Blog__c.bLocation__c}"/>

If you’re using Google Chrome and the site you’re adding isn’t https, it will take a little effort to get the page to load, but once it does, you can’t beat the results. Check it out and enjoy a whole new Salesforce experience with this 15 minute Visualforce project!

-Jared and the Salesforce Guys