+ Start a Discussion

EntitySubscription delete permission

Case Description: ***This issue began after Spring 14 release***

We have a custom object on Cases called RMA. We have a trigger on Cases that will "unfollow" users from the Chatter Entity Subscription when an RMA is processed and the Case is closed. This has been working for the XOR-Media Logistic Management profile for close to one year.

After the Spring 14 release, when a user in that profile processes RMAs which close the case, they receive an error:

• PBSI.beforeInsertRMALineArchive: execution of BeforeInsert caused by: System.DmlException: Update failed. First exception on row 0 with id a0ld0000005hBQ4AAM; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, PBSI_RMA_LinesTrigger: execution of AfterUpdate caused by: System.DmlException: Update failed. First exception on row 0 with id 500d000000GoTtFAAV; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, CaseTrigger: execution of AfterUpdate caused by: System.DmlException: Delete failed. First exception on row 0 with id 0E8d0000004AM5MCAW; first error: INSUFFICIENT_ACCESS_OR_READONLY, insufficient access rights on object id: [] Class.UCase.unFollowonClose: line 33, column 1 Trigger.CaseTrigger: line 38, column 1: [] Class.UPBSI_RMA_Lines.CalculateCaseStatus: line 197, column 1 Class.UPBSI_RMA_Lines.preCalculateCaseStatus: line 88, column 1 Trigger.PBSI_RMA_LinesTrigger: line 32, column 1: [] (PBSI)

Our developers have reviewed this and determined the error is due to the profile that does not have permissions to delete the Entity Subscription. But there isn't a setting that can be enabled for this profile on this object.

This issue does not occur for those with System Administrator profile.

We tried to give the profile in question access to "Moderate Chatter" and "Manager Users" but the issue still happens.

My question is: Did something in Spring 14 change with Entity Subscription object and profile permissions? Is there a permission we can grant to a user to be able to remove Chatter followers.

This is strange, because triggers usually run in system mode. But if that was the case, you'd see the same behavior regardless of whether you used an administrator or a non-admin. Can you read through this article and see if any of the scenarios apply to you?

A Common Myth : Triggers “always” play in GOD Mode (System Context) !
Tyler MowbreyTyler Mowbrey
xormedia, did you ever find a solution to this issue? I am running into the same thing.