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
Abhishek Verma 34Abhishek Verma 34 

Access the User id( which is a look up )on a vf page

Best Answer chosen by Abhishek Verma 34
Abhishek Verma 34Abhishek Verma 34
Use code in the controller as
  Objectname.ownerId=UserInfo.getUserId();

In the vf use

<apex:outputField value="{!Objectname.OwnerId}"/>

and the user name or the owner field is displayed.