New answers tagged

3

From the Manual Sharing section of the document "A Guide to Sharing Architecture" https://developer.salesforce.com/docs/atlas.en-us.dat.meta/dat/dat_components.htm Manual sharing is removed when the record owner changes or when the sharing access granted doesn't grant additional access beyond the object's organization-wide sharing default access ...


1

When the owner changes, sharing calculations are performed sometime around the final commit, long after your triggers. This is what causes your shares to disappear despite your best efforts. You would need something like a future method or queueable to persist those changes correctly. That said, you might consider using Account Team Members, which tend to ...


1

You can't use a String as a type name directly. Instead, you must dynamically resolve the type using Type.forName(), and then create a new instance with newInstance(): sObject so = (sObject)Type.forName(shareObj).newInstance(); Note that since you will not have a concrete sObject instance, you'll have to use the put() method to populate fields. The Type ...


0

I've just faced a similar issue to share cases created by external users and routed to internal users. There are Sharing sets in Community Settings. You can play around with that and set up access to Case by Contact matching to community User Contact. To do so: Go to Community Settings, sharing sets and create a new one Select Case as a supported object and ...


Top 50 recent answers are included