When enabling Customer Portal access for a Contact, Salesforce creates a new Portal User for the person. I am creating an apex trigger for when the user creates a record in an object and would like to refer to information found in their related Contact and Parent Account records.

I believe the foreign keys are stored in the Contacts object (Contact to User), but I'm not sure what the field is called. Could someone help me identify the key?

1 Answer 1


It is the ID of the Contact that is stored in the User object ContactId field and the relationship is called Contact.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .