In Salesforce community cloud, I checked Enable nickname display to show customer's nickname instead of their real name (protect user privacy). But our Salesforce instance has multiple communities, and would like to have those nicknames on the same user account to be unique for each community (customs using SSO for authentication), Since different communities are all connect to the same user, this would be really complicated to implement, and we want to use some of the community standard components that display nicknames.
Couldn't find any answer in the docs, wonder if there is any way other than using different custom fields for each community?
-
1I think this isn't possible with the native functionality, but need to see if there is any declarative way to do this.– Dave HummCommented Sep 22, 2020 at 17:18
1 Answer
You can use custom Aura components that implement the forceCommunity:profileMenuInterface
interface in your different communities, as needed to show something different in the community menu. But no there is no native or configuration-only means of accomplishing this. You will need to make customizations at the user level, community level, or both.
It is likely easier to store the "obfuscated" nickname in the standard Nickname field on the User in case you're using things like Chatter where that value might appear. In which case you don't need to make any customizations to it, users will see that value by default. In any place where you want the full user name or Community Nickname to appear (whether using FirstName and LastName off of the User or a new field on the User record where you store the "Community Nickname"), you can add a custom component to display that instead of the Nickname. Bear in mind using either custom metadata types to store the "Community Nickname" or using a custom field on the User object will both consume queries to fetch the value.
This will be a big undertaking that may or may not be worth the effort. I could definitely see an approach like this getting out of hand beyond 2 or 3 communities.