You need to sign in to do that
Don't have an account?
EmailMessageRelation contact id
Hi all,
I use the Salesforce for Gmail integration to log the emails in Salesforce.
When EmailMessage object is created I query an EmailMessageRelation object to find all the contacts that are related with this email.
On the UI I can see the contact is related as "Other Related People" and has a type of contact.
But when I query EmailMessageRelation it doesn't provide me RelationId nor RelationObjectType, all I get is Id, EmailMessageId, RelationAddress and RelationType. Non of them indicating who the contact is.
Any ideas why can't I get the contact id?
I have another old EmailMessage which has multiple contacts related with it, and EmailMessageRelation returns RelationId (contactId) and RelationObjectType (contact), but I can't seem to replicate that.
Thank you for your responses!
Nerijus
To confirm this, you can try creating an email in your Gmail with multiple recipients, including at least one contact that is related to a Salesforce record. Then, check the EmailMessageRelation records for that email in Salesforce to see if you are able to retrieve the contact Id and relation object type.
If you are still not able to retrieve the contact Id and relation object type for the email, it's possible that there is a data issue or a bug with the Salesforce for Gmail integration. In this case, you can reach out to Salesforce support for assistance.
If you find my answer helpful, please mark it as the best answer. Thanks!