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
Roland Fuchsberger_Roland Fuchsberger_ 

EmailMessageRelation.RelationId field no longer updateable since Spring Release

Hey everyone,
The EmailMessageRelation.RelationId field seems to be no longer updateable since Spring Release. Could anyone help me out here??? A customization depends unfortunately on this and it would cost us several days to rework it.... It was working perfectly before spring 19.

When I update the RelationId field on any record, I get the following error: "[object Object]: insufficient access rights on cross-reference id"

However, documentation says it is updateable: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_emailmessagerelation.htm 

I've tried to run the following query in Developer Console: SELECT Id, EmailMessageId, RelationId, RelationType, RelationAddress, RelationObjectType, CreatedDate, CreatedById, SystemModstamp, IsDeleted FROM EmailMessageRelation and then updated to RelationId field to the Id of my sys admin user. I've removed all triggers from EmailMessage and Task - so this could not cause the issue.

Clemens Kappelhoff 11Clemens Kappelhoff 11
I've got the same problem. (Also see https://success.salesforce.com/answers?id=9063A000000l44QQAQ)

Did you find a solution?
Roland Fuchsberger_Roland Fuchsberger_

I've opend a case with Salesforce and they've created a bug ticket. You are more than welcome to vote for it: https://success.salesforce.com/issues_view?id=a1p3A000001SGuWQAW

Interestingly, the creator of the EmailMessageRelation record CAN modify it. Maybe you can leverage that...

Clemens Kappelhoff 11Clemens Kappelhoff 11
Thank you Roland!
I was able to edit the RelationId field by the creator user of the email (instead of using an authorised user like an administrator).