We want to hide certain fields from appearing based on security role. Is this possible? I know with Field Security you can make fields read only but they still appear.
What is the best way to hide fields completely for certain users?
We want to hide certain fields from appearing based on security role. Is this possible? I know with Field Security you can make fields read only but they still appear.
What is the best way to hide fields completely for certain users?
Thank you. I know business rules can do JS through configuration but I don't think you can make an option to hide via security role through there so would have to be JS
Yes, the field label will be present and visible. Depending on the specific Field Security setting you implement, the data inside the field will either be readable or hidden with *** characters.
Thank you. With field security the Field Label still would appear though right?
Yes, there are several ways to do that actually.
An example of how to implement a JavaScript check for security roles, and action the UI based on the result is shown below.
function UIActionBasedOnSecurityRole() { var roles = []; roles[0] = "Insert_Desired_Security_Role_Name_Here"; var IsUserMemberOfRDR = currentUserHasSecurityRole(roles); function currentUserHasSecurityRole(roles) { var fetchXml = "" "" "" "" "" "" "" "" ""; for (var i = 0; i < roles.length; i ) { fetchXml = ""; } fetchXml = " " "" "" "" ""; var modifiedFetchXml = fetchXml.replace("&", "&"); var users = ExecuteFetch(modifiedFetchXml, "systemusers"); if (users > 0) return true; else return false; }
André Arnaud de Cal... 291,703 Super User 2024 Season 2
Martin Dráb 230,433 Most Valuable Professional
nmaenpaa 101,156