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
Bo MontierBo Montier 

Problem displaying Visualforce Page in Lightning.

I created a visualforce page to allow creation of custom object records. I want this page/form visible on the Case Lightning Page in a Visualforce component, but it is not available in the list of pages on the Case Object. It IS available on the Custom Object lightning page as a component. 

How can I allow the page to be displayed on a different object than the source object? 

Visualforce code and some screenshots below.

<apex:page standardController="RDC_Scanners__c">
  
            <apex:form >
              <apex:pageBlock title="New RDC Scanner"> 
            <apex:pageBlockButtons >
            <apex:commandButton action="{!save}" value="Save"/>
              <apex:commandButton value="Save & New" action="{!quicksave}" onclick="window.location.reload();"/>
                
            </apex:pageBlockButtons>
                 <apex:pageBlockSection columns="1">
                    <apex:inputField value="{!RDC_Scanners__c.Customer__c}"/>
                    <apex:inputField value="{!RDC_Scanners__c.Install_Date__c}"/>
                    <apex:inputField value="{!RDC_Scanners__c.Location__c}"/>
                    <apex:inputField value="{!RDC_Scanners__c.Name}"/>
                    <apex:inputField value="{!RDC_Scanners__c.Scanner_Type__c}"/>
                    <apex:inputField value="{!RDC_Scanners__c.Serial_Number__c}"/>
                    <apex:inputField value="{!RDC_Scanners__c.Status__c}"/>
            
                </apex:pageBlockSection>

            
              
                </apex:pageBlock>
                </apex:form>
        
</apex:page>

Case Lightning Page: User-added image

Custom Object (RDC_Scanners) Lightning Page:
 User-added image
ANUTEJANUTEJ (Salesforce Developers) 
Hi Bo,

As under standard controller you have given "RDC_Scanners__c" it is not being shown in Case Object.

To my knowledge I don't think you can use the same page again in another page because the api names of the fields would be different for the objects that would break the logic.

Hope this is helpful for you and I would request you to please close the thread by marking a best answer so that it can be useful for others in the future and also helps in keeping the community clean.

Regards,
Anutej
Bo MontierBo Montier
The RDC Scanners custom object has a master detail relationship with the Account Object. So if I wanted the page to display on the Case object, would I use the Case Standard Controller and then route the field names through Case.Account.RDC_Scanners__C.Custom_Field_Name__C? Or am I going to need to create a Custom Controller