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

WhoId cannot be associated to Lead if WhatId is associated to Account or Opportunity


It seems that it's not possible to associate a Task to a Lead through the WhoId field if the Task is also associated to an Account or Opportunity through the WhatId.  It is however possible to associate a Task to a Contact and an Account or Opportunity.

Is this restriction in the meta data?  If not, will it be in the meta data in the upcoming versions?




Hi shun,

This is a data structure issue.  A lead is an object that can be related to campaigns and a contact to accounts and opportunities.  It does not make sense to assign a task to an opp or an account and also a lead.  It just doesn't fit any use typical use case.

When I create a task (through the UI) and set a Lead as the 'who', the 'what' fields become disabled. I'd like to set the 'what' to one of my custom objects. Is this possible?
Thanks in advance,
Sorry for the delay.  No, you won't be able to do that.