2

I created a trigger that on a record creation (Custom sObject), subscribes all the createdBy role members to the record.

This code seems to work just fine when executed by a sys admin, but it throws the following error for a user with Chatter Only profile.

Insert failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: []

What I'm missing here ??

2

It was me! I forgot to remove the "With sharing" keyword from the class definition. My bad!

0

Chatter Only profile might not be having sufficient permissions like create,read,update and delete permissions. once check those permissions.

  • Actually he has the right to do so. I tried with hardcoded Ids in a list of EntitySubscription and they were inserted correctly . – melmoussaoui Apr 14 '14 at 11:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.