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
LaurenP6777LaurenP6777 

Render Visualforce Component IF record is in a Set

Hi guys, 

I recently recreated my Account Team related list in visualforce. The delete button is only rendered next to the users own name on the account team. This is obviously to prevent users from deleting other people off account teams. My issue is, I would also like to allow Sales Directors to delete users that report into them. My brilliant idea was to pull the user's role ID and to query all of the roles underneath them in the heirarchy. Problem is, I can't figure out how to ONLY rendered the delete button if the team member's user Id is INCLUDED in the <set>. Is there a way to do this?

Basically- I just want to say "Render IF AccountTeamMember.UserId IN <set>"