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
CTU007CTU007 

apex:inputField on lookup field renders as read-only

Hi, I am using a VF page to override the "New" and "Edit" button of a custom object (LOA approval), LOA is a child ojbect to opportunity(master-detail relationship).

 

 

when I access the VF page directly the inputfield is ok:

lookup field is ok

 

But after I click "quicksave", the field becomes read-only:

I also used this VF page to override the "New" and "edit" button, when user click "edit" button to edit an existing record, the field is also read-only:

 

field is read only

 

Is this supposed to be the way it should work? 

 

If I change to  the following, I got an error:

 

<apex:inputField value="{!LOA_Approval__c.OpportunityId}" />

Error: Could not resolve field 'OpportunityId' from <apex:inputField> value binding '{!LOA_Approval__c.OpportunityId}'