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
minku1986minku1986 

populate user in a lookup

I have to populate a user lookup field in an object through apex. What value of the user object do I need to assign it such that it gets the user in the lookup feel automatically?

 

I am assigning the OwnerId field. Is that correct?

Message Edited by minku1986 on 03-03-2010 06:51 PM
tmatthiesentmatthiesen
If the field is a lookup to the User object - you simply need to set the value to the corresponding User.id.