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
daveccookdaveccook 

Would like to create a lookup relationship on the standard User object

We have a custom object that contains locations and metadata about each location.  I would like to be able to relate each user to one of the locations for use in a number of custom applications.  When adding a custom field on the standard User object there are no relationships available.  Is there any way to achieve this without replicating all users in some other object?

Best Answer chosen by Admin (Salesforce Developers) 
SF-CloudsSF-Clouds

Hi,

 

As Lookup custom fields are not available for User standard object, you will have to create UserLocationMatrix object to specify User and location relationship. I can not see any other workaround for this matter. for more details you can reach me at p.yadav@sfclouds.com

 

Regards

Pankaj

All Answers

SF-CloudsSF-Clouds

Hi,

 

As Lookup custom fields are not available for User standard object, you will have to create UserLocationMatrix object to specify User and location relationship. I can not see any other workaround for this matter. for more details you can reach me at p.yadav@sfclouds.com

 

Regards

Pankaj

This was selected as the best answer
daveccookdaveccook

I did check this out with our SFDC contact and they confirmed the same.  The best solutions they could give were to either put all location fields directly on the user, or create a table that would have lookups to both user and location as you noted.  Not yet sure which option will be best for us looking forward.