+ Start a Discussion
MohanaGopalMohanaGopal 

Parent ID

Hi,,

I have override child new button as VF page, When I click new button in Parent Related list I need to display  parent name in corresponding field in Child page.. I have to fetch values based on the parent id from another object and displayed it in child page.. But my case Parent Id is display as null ..

My code is
  <apexageBlockSection title="Information" id="info">
    <apex:inputField id="CurrentProject" value="{!Calculated_Measures__c.Project__c}"/>
  </apexageBlockSection>

Any one send sample code for resolve my problem..

hisrinuhisrinu
Hi,

 You can use this query to get the values from the parent record.


Select a.Id, a.Name, a.ParentId, a.Parent.BillingCity, a.Parent.BillingCountry, a.Parent.BillingStreet, a.Parent.Name from Account a
MohanaGopalMohanaGopal
Thanks Srini.
 
   Its work fine....
elpaso750elpaso750

Hi,

any chance you could post the relative visulforce page and apex code as an example ?

 

thanks

Alex