function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
amarnijeramarnijer 

how to get sharing records which are shared with Parent role and its subordinates?

Hi,

I have a role hierarchy like "C" reports to "B' and "B" reports To "A". In OWD Lead Object Is Private, role hierarchy is checked.   Now Some other user "X" has shared all his leads to "A`s role and subordinates". Now When "A" logs in he can see a Custom Tree  of all his Subordinates. when "A" select "C" from tree, all the Lead records that "C" can view should display in a table (below the roll tree). I am able to get UserId of "C" when "A" clicks on the tree, but How can I get C`s lead records using its Id?  I am able to get all records where "C" is the Owner. But In Lead share the records share with A and A`s Subordinates. Please give me some solution.