Conditional rendering based on group membership

  • 1
  • Question
  • Updated 2 years ago
  • Answered
I would like to conditionally render a table based on if a user is a member of a specific Salesforce public group.   Any suggestions?
Photo of Jeffrey Lawler

Jeffrey Lawler

  • 1,454 Points 1k badge 2x thumb

Posted 2 years ago

  • 1
Photo of Chandra V

Chandra V, Champion

  • 6,966 Points 5k badge 2x thumb
We are doing this!

Create a model set up like this:
Salesforce object: GroupMember
Conditions:
    UserOrGroupId is the running user ID
    Group.DeveloperName is your group's name
Record Limit = 1
Load on page load

Then conditionally render your table based on this model having data rows.
Photo of Jeffrey Lawler

Jeffrey Lawler

  • 1,454 Points 1k badge 2x thumb
Chandra

Thank you.  That works perfectly.

Jeff