I have an application that dynamically handles CRUD operations for Salesforce data. For foreign key values on an object, I read the first three letters of the ID to determine the object type being referenced (as asked here).

For the WhatId on an Event, this solution works great, however, the WhoId on an Event seem to be an anomaly. Based on the ID associated with the WhoId, the first three letters indicate that it is either a Contact or Lead, so naturally my dynamic application will send them to the Contact or Lead screen. However, the Salesforce website sends them straight to the member screen.

  1. How is this association made?
  2. How should I handle this?

Note: I thought maybe the PersonContactId field on an Account may be of interest, but I'm not sure.

Rest API v 31.0

  • It sounds as though the Event is associated with a Campaign and the WhoID must be a Lead and therefore a member of the Campaign. It would appear you need to add some logic to put the WhoID into context based on the value or Type of the WhatID.
    – crmprogdev
    Oct 22, 2014 at 19:53


You must log in to answer this question.

Browse other questions tagged .