• Clemens Kappelhoff 11
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies

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.


We have a custom EmailService for inbound messages written in apex, which is processing Inbound email messages and then showing them in a lightning component.
The type od the received email object is EmailMessage. On the production org, when the system administrator is logged in, he sees all the needed incoming emails (the component is showing them as it should be, querying also works). It all worked well in our sandbox though.
The problem is when the user is logged in. The component does not show any emails and they are not visible also by querying. The problem is I suppose with some permissions, but the EmailMessage object in our org is not customizable when it comes to permissions (everything is set to default and is not changeable). The user has a company community licence. Any help or suggestion would be greatly appreciated.