0

I am trying to make a custom report for a dashboard in Salesforce lightning. I read here on how to create a Visualforce page and then use that as a component on the dashboard. So I did create a VF Page and when I go back into the Dashboard on which I am trying to add this VF page to, I click on + Component and all I see are reports, I cant seem to find a type that says VF pages. Am I doing something wrong?

Here is what I have on the VF Page:

<apex:page standardController="Case" recordSetvar="cases">
    <apex:pageBlock>
        <apex:form id="theForm">
            <apex:panelGrid columns="2">
                <apex:outputLabel value="View:"/>
                <apex:selectList value="{!filterId}" size="1">
                    <apex:actionSupport event="onchange" rerender="list"/>
                    <apex:selectOptions value="{!listviewoptions}"/>
                </apex:selectList>
            </apex:panelGrid>
            <apex:pageBlockSection>
                <apex:dataList var="c" value="{!cases}" id="list">
                {!c.subject}
                </apex:dataList>
            </apex:pageBlockSection>
        </apex:form>
    </apex:pageBlock>
</apex:page>

But I only see options to add Reports only nothing else.

enter image description here

What am I doing wrong? Please let me know, thanks!

1
  • I had the same idea. I want my VFP show up on a dashboard. But is it possible at all in Lightning Experience or is it just a classic thing? Is it possible at all, to show something like a html-based-table in dashboards? Also, is there maybe a better Idea, to achieve the same thing? Since this started as a workaround.. SF y? ..
    – M4keSome
    Commented Oct 30 at 13:03

1 Answer 1

-1

Per the documentation:

Visualforce pages that use the Standard Controller can’t be used in dashboards

You'll need to write a custom controller for this page.

2
  • Hi @David Cheng, so I followed you'e documentation, copied over the code for the class and the VF page, it's still now showing up under add component option in Dashboard Commented Sep 22, 2021 at 14:53
  • Is this only available in Classic? Commented Sep 22, 2021 at 15:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .