-2

Where will we use whoId and whatId basically in salesforce?

Very confusable can anyone help me out

2
  • Have you googled it? There are number of examples and articles related to this topic. At SFSE we encourage users to search and try to solve their problems on their own before asking the question. :)
    – Mahmood
    Nov 20, 2017 at 12:44
  • 1
    Salesforce also has good description on both here.
    – Mahmood
    Nov 20, 2017 at 12:46

2 Answers 2

3

"WhoID" refers to people things. So that would be typically a Lead ID or a Contact ID

"WhatID" refers to object type things.That would typically be an Account ID or an Opportunity ID

You can use query something like this :

                select id, whatid from task
0

plaese see the snap.

whoid is lookup field of contact object and whatid is lookup field of account object on task object

enter image description here

Regards, Suraj

1
  • 2
    That is not completely right! WhoId can also belong to a Lead; WhatId can be opportunities, campaigns, cases, or custom objects not just accounts.
    – Mahmood
    Nov 20, 2017 at 12:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .