I am trying to hide a field depending on the user community. I am able to do this through field visibility rules using
User/SessionObject/sys_community = 1030. I am trying to see if I can somehow use the name of the community and not the id in the visibility rule. For e.g something like
User/SessionObject/sys_community LIKE ADMIN_COMM. Is there a way to achieve this?
The name is not generally used in the system. sys_community is always a number, so LIKE will not work. I don’t know of any way to do this w/o writing a custom extension.
Thanks for the reply. I think it would be a great idea if we can have some built in functionality to hide fields by name of community similar to that of role. We cannot depend on id as they keep changing from environment to environment. Also, isn’t MSM looking at the name of a community rather than the id of it when pushing changes?
If you are using MSM to deploy, I believe you can map this id so that MSM will translate it when deploying to a different server. This would eliminate the problem you mention.