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
vivek singh08481200707119766vivek singh08481200707119766 

what is how id in salesforce(what id and how id)

Best Answer chosen by vivek singh08481200707119766

Hi Vivek,

There is no How ID in salesforce, We have WHAT ID and WHO ID.

Where WHAT ID is reffered to the Event and WHO ID is referred to the Record Addressed to a LEAD or a CONTACT.

See some documentation below, 

Difference between WhoID and WhatID

Who ID 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

What ID refers to object things. That would be typically be an Account ID or an Opportunity ID or Campaign ID or Case ID

You can get the Who or What type in the query no need for a new function and extra round trips

select id, subject, whoId, who.type from task

the who.type will tell you what type of object the whoId is.

[Select from task where id = :taskid];