You need to sign in to do that
Don't have an account?
Unable to insert Account Share object through apex code
Hi,
A user is running a class in without sharing context and still the user is not able to insert AccountShare object record through apex code. When i searched online , I found that a user should have modify all data permission to insert the AccountShare record.
But when there is another custom object to which the user has absolutely no access , he is able to insert the record through apex code.
Is this a salesforce bug or what?How can i overcome this.
Any ideas are much appreciated.
Regards,
Ankit
A user is running a class in without sharing context and still the user is not able to insert AccountShare object record through apex code. When i searched online , I found that a user should have modify all data permission to insert the AccountShare record.
But when there is another custom object to which the user has absolutely no access , he is able to insert the record through apex code.
Is this a salesforce bug or what?How can i overcome this.
Any ideas are much appreciated.
Regards,
Ankit
Check the below post for more information on this
http://astreait.com/Creating_Apex_Sharing_rules/
I have owd set to Private for Account & other related objects like Opportunity and contact and I am providing Full Read/Write through my code.