Say I have a custom object, Division, that has two fields: name and address.

Say I want to make 2 custom fields in User (standard object):

field 1 is the User's Division: a picklist, populated by the names of all unique existing Divisions.

Field 2 is the User's Address: a text field, autofilled from the corresponding Division address (e.g. if User A is in Division B, then User_A.Address = Division_B.Address).

Is there a way to relate a standard object to a custom object in this manner?


You cannot create Lookups on User - thus you cannot have a relationship between User and Division. You still have a couple options depending on how scalable you need this solution to be.

  1. User.Address (field 2) should be a Formula (text). This field will use CASE() to determine the Address based on User.Division (Field 1). This solution is the easiest to implement, but it is not ideal because any changes to Divisions will need to be made to both the Division records and the User.Division formula.
  2. Trigger on User object. This trigger can query Division records to find a Divison where Division.Name == User.Division. Then populate, User.Address with Division.Address. This solution is more dynamic and maintainable, but it will be a lot more work to implement.
  • I went with the Trigger method, which ended up working perfectly. Thanks for the help!
    – gfppaste
    Jan 24 '13 at 19:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.