You need to sign in to do that
Don't have an account?
Chatter Security - Adding someone to follow
I've created some triggers so the when an opportunity reaches a certain level the regional manager would start following the opportunity till it is closed and then it would stop. Everything works fine when I'm logged in and going through the actions as an admin, but when I login as one of our sales people I get the following error.
INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: []: Class.ChatterUtils.AddFollower: line 13, column 7
If I change the users profile and check Modify All Data then everything works, but for obvious reasons I don't want to open up everything to our users.
Does anyone know if there is a way to make this work?
Thank you,
Craig
Craig,
I had the exact same problem. However, I have most of the code in a class, which is called by a trigger, and the class had sharing enabled. Once I removed the sharing from the class, it worked perfectly.
Jennifer
Hi Craig,
Do you mind sharing your code as i am planning to implement similar to what you have designed.
Thanks!
Hello,
You'll have to change a couple items, but here is the general idea - hope this helps. I have a trigger that calls a class which the determines if I'm going to follow are remove the follow and that class calls these functions.