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
Nicole Chang_Nicole Chang_ 

Add WhatId field to custom object?

Hello guys, 
Ive created custom object and would like to add a field with same behavior as "Related To" (WhatId) with dropdown list with objects so that users can choose from (same as in Events / Tasks). 
Not sure if its possible please? or is it available for Activities only?

Thanks
User-added image
VinayVinay (Salesforce Developers) 
Hi Nicole,

WhatId is the API name for the “Related To” field on the Activity-related objects and it is not available on opportunity.

​​​​​​Please mark as Best Answer if above information was helpful.

Thanks,
Nicole Chang_Nicole Chang_
tks @Vinay, so its not possible to have the WhatId field on any custom object other than tasks/events?
VinayVinay (Salesforce Developers) 
Yes that's correct.  Let me know if you have any further questions.

Thanks,