Again raising the question from the link. Case is Private and Payment is also Private. Payment has lookup relationship with the Case.

I have developed code which create share object for Case and Payment object.

How to combine below two query ? Is that possible to combine ?

SELECT CaseAccessLevel,CaseId,Id,IsDeleted,LastModifiedById,LastModifiedDate,RowCause,UserOrGroupId FROM CaseShare where CaseId = 'YYYY'

SELECT AccessLevel,Id,IsDeleted,LastModifiedById,LastModifiedDate,ParentId,RowCause,UserOrGroupId FROM Payment__Share where ParentId = 'XXXX'


Share Objects do not store relationship between Case and Payment objects. So you need to use two separate queries.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.