- edited description
Apex Managed sharing not supported in OST
Noticed a minor issue with class analysis and using custom RowCause (Apex Sharing Reason)
Schema.MyObject__Share.RowCause.MyRowCause__c
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
Schema.MyObject__Share.RowCause.MyRowCause__c
Comments (8)
-
reporter -
reporter - edited description
-
reporter - edited description
-
repo owner - changed component to Offline Symbol Table
- changed title to Apex Managed sharing not supported in OST
Updated to reflect the underlying issue. The
RowCause
field of any*__Share
object is rendered as typeString
, but for Apex managed sharing that's not quite correct. InsteadRowCause
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.
-
reporter Thanks Scott.
-
repo owner Partial fix delivered in 2.0.0.6. 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. -
reporter Still seeing this error for Schema.AccountShare.RowCause.Manual
-
repo owner - changed status to resolved
Issue tracker grooming. If this is still an issue, please feel free to reopen, ideally with a concrete reproduction scenario.
- Log in to comment