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
Ritu Ghosh 5Ritu Ghosh 5 

In case we create a task in contact that is associated with any Account then respective task in available in account as well?Is it as these entities are related via AccountId.

Akshay_DhimanAkshay_Dhiman
Hi Ritu,
  • First of all, I would like to tell you that,
    • In case of Contact, Contact is linked to Account via AccountId.
    • In case of Task, Task is linked to Account via WhatId, and linked to Contact via WhoId.
  • Now, If You Create a ‘Task’ on ‘Contact’ which is already associated with particular account via AccountId, Then Yes, it would be available in Account also.These entities are related via AccountId/WhatId/WhoId.
  • And even If you do not select any Account while creating ‘Task’ on ‘Contact’ it will still available on Account’s Related tabs, because the ‘Contact’ on which you are creating ‘Task’ has a relationship with ‘Task’ via WhoId.
For Understanding ‘WhoId’ and ‘WhatId’ more, please refer it:
http://https://developer.salesforce.com/forums/?id=906F00000008wZlIAI

Hope it will be helpful.
Please mark it as best answer if the information is informative.so that question is removed from an unanswered question and appear as a proper solution.

Regards,
Akshay.