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
Amber NeillAmber Neill 

New to Visualforce: can't get Opportunity Owner as an input field

I'm new to Visualforce....really new!

I need to allow my users to modify the Owner of an Opportunity but my code isn't working.  Here it is:

<apex:inputField required="true" value="{!opp.owner.name}"/>

When I look at the page with data the Owner is a non-editable field, but all the other fields (with exactly the same code) are editable!

What am I missing?  Is Owner a special field that needs to be handled in a different way?!

Any help you can provide is much appreciated!
Amber

Best Answer chosen by Admin (Salesforce Developers) 
aballardaballard

Try  value="{!opp.ownerid}"

All Answers

aballardaballard

Try  value="{!opp.ownerid}"

This was selected as the best answer
Amber NeillAmber Neill

That is so awesome!  I love Visualforce!

Thanks!!!
Amber