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
Anil IngleAnil Ingle 

How do we run or use visualforce page in both Standard Classic and Lightning Experience?

Hello All,

We have created custom view page in visualforce. When we run visualforce page in Standard classic, it's display as per the acceptation. But this visaulforce page run in lightning experience,
 it is not display well format.
Please let me know, How do we run or use visualforce page in both Standard Classic and Lightning Experience?

Visualforce Page code

<apex:pageBlock >
        <apex:form id="theForm">
            <div align ='Center'>
                <apex:commandButton action="{!CreateOpportunity}" value="Create New Opportunity"/>
                <br/><br/>
            </div>
            <apex:pageBlockTable value="{!accountPagination}" var="c">
                <apex:column value="{!c.Opened__c}"/>
                <apex:column value="{!c.Company_Name__c}"/>
                <apex:column value="{!c.Agent__c}"/>
                <apex:column value="{!c.Custom_Num__c}"/>
                <apex:column value="{!c.Product_Type__c}"/>
                <apex:column value="{!c.Quantity_of_Addresses__c}"/>
                <apex:column value="{!c.Status__c}"/>
                <apex:column headerValue="Opportunity">
                    <div style="display:{!if((c.Opportunity__c == ''),"none","normal")};">
                        <apex:outputLink value="{!$Site.BaseUrl}/{!c.Opportunity__c}" >{!c.Opportunity__r.Name}</apex:outputLink>
                    </div>
                    <div style="display:{!if((c.Opportunity__c == ''),"normal","none")};">
                        <apex:commandButton title="Create" action="{!ViewOpportunity}" value="Create" reRender="all">
                            <apex:param name="Account" value="{!c.Company_Name__c}" assignTo="{!AccountId}"/>
                            <apex:param name="Custom" value="{!c.Cumstom_Num__c}" assignTo="{!RfqNumber}"/>
                        </apex:commandButton>
                    </div>
                </apex:column>
            </apex:pageBlockTable>
        </apex:form>
    </apex:pageBlock>

Thanks in Advance!!


User-added image
NagendraNagendra (Salesforce Developers) 
Hi Anil,

May I suggest you please check with below link which might help. Hope this helps.

Thanks,
Nagendra.