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
MayMay 

Error while adding an event

I get the following error while adding an event.

Who: id value of incorrect type: ...

The id value that I have supplied to the who field is the ID of the user in the User Table. Could somebody help me on this.

Thanks

ScotScot

May,

I've found this confusing as well. The Who ID should be either a Contact or Lead ID.

The labels for the event fields are a little clearer than the names of the fields ...
     WhoId -> Contact/Lead ID
     WhatId -> Opportunity/Account
     OwnerID -> Assigned To ID
and then, more clearly,
     AccountId -> Account ID
     CreatedById -> Created By ID
     LastModifiedById -> Last Modified By ID
     Id -> Activity ID
     
Scot    

DevAngelDevAngel
To determine definitively what is a valid id in the whoid and whatid fields, you should run a describe call on the object in question and carefully examine the reference values of the whoid and whatid field definitions.