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
pChan1412pChan1412 

Master-Detail lookup in custom controller visualforce page.

Hi all,

 

i am not able to show master detail lookup field in a custom contoller visualforce page.

 

Suppose test1__c (detail) object has to MD field testfield__c to test2__c (master) object and if i use the inputField tag with  value="{!test1__c.testfield__c}", the lookup field does not show up. just the label of the field appears. i know this works fine in stdcontroller but my page is not stdController.

 

Is this even possible?

Please advise ASAP.

 

Thank You,

Puneeth.

Best Answer chosen by Admin (Salesforce Developers) 
colemabcolemab

If you are using a custom controller (as opposed to an extension of a standard controller), then I think you will need to add this field to your SOQL query when you initally populate the object from the record(s).