function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ananthanarayanan NemmaraAnanthanarayanan Nemmara 

Visualforce page not visible in lightning

Hi All,

I am working on salesforce lightning.Please find below my visualforce page code. I am able to preview it but i want to add this visualforce page to account page. Can someone please suggest what needs to be done?
Problem: I cannot see my visualforce page on page layout palette of account
code:
<apex:page standardController="Opportunity" recordsetVar="oppList1" lightningStylesheets="true" extensions="Account">
    <apex:pageBlock title="Invoiced Orders">
        <apex:pageBlockTable value="{!oppList1}" id="accountId" var="a">
            <apex:column headerValue="Account Name" value="{!a.id}"/>
            <apex:column headerValue="Order Number" value="{!a.Order_Number__c}"/>
            <apex:column headerValue="Order/ invoice reference" value="{!a.Order_Invoice_Reference__c}"/>
            <apex:column headerValue="Record Type" value="{!a.RecordTypeId}"/>
            <apex:column headerValue="Invoice" value="{!a.Invoice__c}"/>
            <apex:column headerValue="Date Shipped" value="{!a.Date_shipped__c}"/>
            
        </apex:pageBlockTable>
    </apex:pageBlock>
     <apex:pageBlock  title="Open Orders">
        <apex:pageBlockTable value="{!oppList1}" id="accountId" var="a">
            <apex:column headerValue="Account Name" value="{!a.id}"/>
            <apex:column headerValue="Order Number" value="{!a.Order_Number__c}"/>
            <apex:column headerValue="Order/ invoice reference" value="{!a.Order_Invoice_Reference__c}"/>
            <apex:column headerValue="Record Type" value="{!a.RecordTypeId}"/>
            <apex:column headerValue="Invoice" value="{!a.Invoice__c}"/>
            <apex:column headerValue="Date Shipped" value="{!a.Date_shipped__c}"/>
            
        </apex:pageBlockTable>
    </apex:pageBlock>
</apex:page>

Preview:
Preview
Have already checked the "Available for Lightning Experience, Lightning Communities, and the mobile app" checkbox:
checkbox

Regards,
Anand
Raj VakatiRaj Vakati
If you wanted to add it to the account layout you need to set standardController to account. But you are setting to Opportunity and referring from the account page layout. So it is not showing on the account page layouts ..

to fix it simply set standardController="Account"