+ Start a Discussion

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>"