I have a custom object on which i have a field named Owner which is of Data Type Lookup(User,Queue). When i access this field on visualforce page like below just using standard controller, i am getting error :

<apex:inputField label="Owner" value="{!CustomObject__c.Owner}"/>

Expression value does not resolve to a field Error is in expression '{!CustomObject__c.Owner}' in component in page page1

How can this field be accessed in vf page.

EDIT : Owner is a standard field on my custom object named CustomObject and i am using standard controller on apex:page tag using <apex:page standardController="CustomObject__c">


Changing to

<apex:inputText label="Owner" value="{!CustomObject__c.Owner}"/>

works but i am not getting lookup UI functionality.

  • 1
    The Owner field is actually OwnerId, so do {!CustomObject__c.OwnerId}. – ScottW Feb 15 '15 at 15:02
  • @ScottW Apologies .Looks like you recommened same solution also when i typed my answer as well.so i am ready to delete this and you can add your answer sir if you like :).I will upvote that as well – Mohith Shrivastava Feb 15 '15 at 16:03
<apex:inputField label="Owner" value="{!CustomObject__c.OwnerId}"/>
  • Now i am getting this error: Error: Unknown property 'CustomObject__cStandardController.CustomObject__r'. – Walker Feb 15 '15 at 14:54
  • Can you try now? – Mohith Shrivastava Feb 15 '15 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.