You need to sign in to do that
Don't have an account?

Sharing Object
Hi all,
I'm trying to share a record with certain users when they are assigned via a lookup (on Project_Activity__c) but i cant find the sharing object, i have a custom object Project__c but there isnt a sharing object Project_Share do i have to generate this somehow? the project is the master in a master detail relationship with Project_Activity__c. I've got the sample code from salesforce and it all looks ok but im getting invalid type Project_Share as this object doesnt exist, does anyone know what i need to do?
Thanks Guys
Also, there is no __Share object for custom objects that are "Controlled by Parent", since the sharing depends on the parent record(s).
All Answers
Try Project__Share - note the double underscores.
yeah sorry that was a typo when i put it on here it is Project__Share (double underscore) but there isnt an object of that name in the database? is there something i have to do to generate it?
Share objects only exists if that object has private or public read-only in org-wide-default settings. Please check the org-wide-deafult setting for project__c.
Also, there is no __Share object for custom objects that are "Controlled by Parent", since the sharing depends on the parent record(s).
Yeah thats exaclty the reason why the __share wasnt there!!!! thanks for your help guys!
What is the trick for sharing objects on the detail side of master detail relationship that are "Controlled by Parent"? The master in this case is Account object. Should sharing be done with Apex managed sharing on AccountShare object since there is no __Share object for related custom objects?
There is no independent sharing on detail records, so sharing should be done on Account via AccountShare object. When parent is shared, details should automatically be shared.
Could one use AccountShare in Apex for sharing master detail records between two partner portal accounts?