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
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