top of page

Visualforce page in a dashboard

<apex:page controller="retrieveCase" tabStyle="Case"> <apex:pageBlock> {!contactName}'s Cases <apex:pageBlockTable value="{!cases}" var="c"> <apex:column value="{!c.status}"/> <apex:column value="{!c.subject}"/> </apex:pageBlockTable> </apex:pageBlock> </apex:page>


public class retrieveCase { public String getContactName() { return 'Babara Levy'; } public List<Case> getCases() { return [SELECT status, subject FROM Case WHERE Contact.name = 'Babara Levy' AND status != 'Closed' limit 5]; } }

To create a dashboard that uses this Visualforce page:

  1. View the dashboard and click Edit.

  2. Click Add Component from the top of any column.

  3. Choose a Visualforce Page as the component type.

  4. Optionally, enter a header to display at the top of the dashboard component.

  5. Optionally, enter a footer to display at the bottom of the dashboard component.

  6. From the Visualforce Page drop-down list, select VFDash.

  7. Click Save.

Recent Posts

See All
Reference to a page in Visualforce

//refererence to google page PageReference pageRef = new PageReference('http://www.google.com'); //reference to the saved Visualforce...

 
 
 

Comments


Post: Blog2_Post

©2020 by SalesforceDemystified. Proudly created with Wix.com

bottom of page