[SalesForce] One lookup field for Multiple Objects

Requirement: To track tickets in Salesforce using Case object. So if users have issues in Salesforce they would create a Case.

Example: If a user has an issue with an Account record -> they would create a Case – put in the description of the issue, but we want the user to attach the record, in this case, an account record to the case using a lookup so that we track the tickets back to the record.

Issue: An issue can arise from multiple objects and we do not want to create multiple lookup fields for all the objects we have from Case object. Salesforce does not support muti-object lookup except for tasks, Is there any other way to achieve this?

Best Answer

You cannot create custom polymorphic fields, no. The best you can do is vote for this idea:

Custom Polymorphic Id field (WhoId/WhatId)

When creating a custom SObject that needs to be related to lots of different SObjects the use of a polymorphic Id field would be ideal.Then developers would not need to know what is in the user environment, or rely on admins setting up their app correctly.

Related Topic