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

Set custom field in user profile



Without the ability to have lookup fields in the User profile or Workflows, I'm looking to try and Apex solution to my problem.


I would have a field on the User's profile called:




I will also have an object which will have a lookup that will contain:


A user on the system

A region (which is a lookup field itself)


Using that user as the relationship, I want to pull off what Region they are and populate that field on the User profile.


Is this something that is relatively easy to achieve?



sushant sussushant sus
try this

trigger test on custom object(before insert,before update)
list<user>u=[select name from user where id in:list1];
for(user u1:u)


Bhawani SharmaBhawani Sharma
Create a trigger on your custom object and update the user record at the same time like
update new User(Id = userId, Region = region);

Thanks guys, I shall have a play with your suggestions.