I have a need to set a field, Account.Previous_Owner_Id__c, which will store the 18 characters Id of the User who used to be the previous owner of the account.
Questions:
- If we create this field as a lookup field to reference the User object, is there any overhead added to the system? For example, having an additional lookup field makes the SOQL queries longer to load even when the field isn't referenced in the
SELECT
portion of the query. - Would it be better to just use a 18 character Id field as a text field?
Best Answer
There are some costs in the backend, but for a single field, these costs are insignificant for the benefits you get; the ability to get field data from the related objects in reports, queries, the ability for Salesforce to validate the ID values as existing records, being able to display the name of the record when you put the field on a page layout and reports, etc.
This almost always ends up not being worth the trouble. I'd avoid doing this if you can help it.