Apex Managed sharing not supported in OST

Issue #842 new
Tony White created an issue

Noticed a minor issue with class analysis and using custom RowCause (Apex Sharing Reason)


it reports an error that MyRowCause__c cannot be resolved.

I do NOT believe it blocks anything, noticed it under 2.0.?

Recreate: Create a custom object (Allow sharing) Set Sharing Settings for Object to be Private On the Custom Object add new 'Apex Sharing Reasons'

Sync down environment and try to access that via


Comments (7)

  1. Scott Wells repo owner

    Updated to reflect the underlying issue. The RowCause field of any *__Share object is rendered as type String, but for Apex managed sharing that's not quite correct. Instead RowCause should be an effect "parent" for the Apex sharing reasons on the SObject.

    This is a non-trivial change to make right now, but what I will do is ensure that the inspection doesn't highlight this as an error for the next build. While it won't be perfect, at least it will get rid of the false negative for valid code.

  2. Scott Wells repo owner

    Partial fix delivered in You should no longer see the code inspection false negative, but because IC won't have the actual metadata for managed sharing, you won't have code completion or reference navigation for the last element (e.g., MyRowCause__c) in that expression.

  3. Log in to comment