+ Start a Discussion

Getting Case owner ID being able to edit

I have a my visualforce page overriding my cases.
To get the case owner, I am using the following line:

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

However, the name on the field changes based on whoever is logged in looking at the case instead of the user who opened the case (owner).
Also, I would like to add a way where the owner can be changed by the user to another user or queue.

Please help!!!!
This doesn't sound right - the Case.OwnerId field contains the id of the user that created the case.  This sounds like the page is always creating new cases rather than editing existing ones.  Also, the inputfield will render the appropriate widget by default to allow you to change the owner - a picklist for User/Queue and then a lookup to allow you to specify the user in question.
Then why do you tnink it is creating new cases instead of editing the existing ones? Is there another attribute I might be missing?
Mohit Bansal6Mohit Bansal6

Can you please share your whole code to analyse issue?