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
    Commented Feb 15, 2015 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 Commented Feb 15, 2015 at 16:03

1 Answer 1

<apex:inputField label="Owner" value="{!CustomObject__c.OwnerId}"/>
  • Now i am getting this error: Error: Unknown property 'CustomObject__cStandardController.CustomObject__r'.
    – Walker
    Commented Feb 15, 2015 at 14:54
  • Can you try now? Commented Feb 15, 2015 at 15:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .