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
Ashish_SFDCAshish_SFDC

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

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

WhatID
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 Who.name from task where id = :taskid];

http://www.infallibletechie.com/2012/09/difference-between-whoid-and-whatid.html

http://theblogreaders.com/difference-between-whatid-and-whoid-in-events-and-task/#.U5AonfmSwpE


Regards,
Ashish