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

How to get User in Query?

Salesforce sends welcome email to community users, if you have checked the checkbox in All community>>Workspace>> Administration>>Email> Send welcome email checkbox.

I need to send a VF email template from here so that salesforce will construct the link behind Community_URL.

But there are two profiles and i need to check the profile in controller of the VF Email so that only some part of text will be visible to one profile of user and another text would be visible to another profile of users.

How to get the users in controller??

Sainath VenkatSainath Venkat
Hi IntegrationGuy,

You can add below line to your controller to get the profile Id.
Id profileId = [Select Id From Profile Where Name='Profile name goes here'];

Hope it helps