You need to sign in to do that
Don't have an account?
Sandeep M 1
Display parent as lookup field on child in visualforce page
have two objects SFDC_PTO_Request__c (child),Employee__c (parent) with Master-Detail relationship. I need to display parent on child record while inserting on visualforce page which was a lookup relationship. I am trying as below
<apex:page standardController="SFDC_PTO_Request__c" recordSetVar="SFDC_PTO_Request" sidebar="false">
<apex:form >
<apex:pageBlock title="Leave Request Edit">
<apex:pageBlockButtons >
<apex:commandButton action="{!Save}" value="Save"/>
<apex:commandButton action="{!Cancel}" value="Cancel"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="Information" columns="2" collapsible="false">
<apex:inputField value="{!SFDC_PTO_Request__c.Type_of_leave__c}"/>
<apex:inputField value="{!SFDC_PTO_Request__c.Available_Casual_Leaves__c}"/>
<apex:inputField value="{!SFDC_PTO_Request__c.Available_Sick_Leaves__c}"/>
<apex:inputField value="{!SFDC_PTO_Request__c.Request_Type__c}"/>
<apex:inputField value="{!SFDC_PTO_Request__c.Employee__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Request Dates" columns="2" collapsible="false">
<apex:inputField value="{!SFDC_PTO_Request__c.Request_Start_Date__c}"/>
<apex:inputField value="{!SFDC_PTO_Request__c.Request_End_Date__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
could some one help me to display the lookup field of parent on child record
<apex:page standardController="SFDC_PTO_Request__c" recordSetVar="SFDC_PTO_Request" sidebar="false">
<apex:form >
<apex:pageBlock title="Leave Request Edit">
<apex:pageBlockButtons >
<apex:commandButton action="{!Save}" value="Save"/>
<apex:commandButton action="{!Cancel}" value="Cancel"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="Information" columns="2" collapsible="false">
<apex:inputField value="{!SFDC_PTO_Request__c.Type_of_leave__c}"/>
<apex:inputField value="{!SFDC_PTO_Request__c.Available_Casual_Leaves__c}"/>
<apex:inputField value="{!SFDC_PTO_Request__c.Available_Sick_Leaves__c}"/>
<apex:inputField value="{!SFDC_PTO_Request__c.Request_Type__c}"/>
<apex:inputField value="{!SFDC_PTO_Request__c.Employee__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Request Dates" columns="2" collapsible="false">
<apex:inputField value="{!SFDC_PTO_Request__c.Request_Start_Date__c}"/>
<apex:inputField value="{!SFDC_PTO_Request__c.Request_End_Date__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
could some one help me to display the lookup field of parent on child record
Read, Create, Edit, Delete, View All, Modify All, View Setup, Edit Setup, Delete Setup all were given