So you’ve finally outgrown the standard page layouts in Salesforce and are ready to graduate to the exciting world of custom Visualforce pages. Congratulations! Whether you’re just looking to spice up your records with a basic Visualforce element or want to totally reinvent the way your users interact with your Salesforce org, the possibilities are nearly endless. You may be dreading the chore you’ve heard it is to add charts to a Visualforce page, but with several recent updates to Salesforce, adding Visualforce charts is as easy as dropping a new field on the page!
To add a chart to your Visualforce page, first go and create a Report with a chart in it. As an example, why not try a bar chart of Leads created by month. Copy the ID (check out this post for more on Salesforce URLs if you’re having trouble finding it), paste it into the following element and add it to your Visualforce page: <analytics:reportChart cacheResults="false" size="small" reportId="00O90000007fzQc"> </analytics:reportChart> . And there you have it! With this one line of code, you’ve just saved yourself and your developer team hours or months of work! And no need to refresh like typical Dashboard elements – these refresh every time you load your page. Have a blast, and let us know what awesome things you’re doing with Visualforce.
-Jared and the Salesforce Guys
CEO of CloudMyBiz Salesforce CRM consulting services with a deep knowledge in the lending industry. Taking keen interest in the project management side of operations, playing a vital role in the 31% YOY company growth. Strategic leader, mastering the ability to problem solve at every level of the business, providing effective solutions for clients.