Asked by:
how to restrict a user from accessing a form

Question
-
Hi,
I have a requirement where I need to write some script to hide the entire form(or disable in some kind) for a particular user.
This user will be entered in an exclusion list by the form owner. So when this user logs in to view the form, he should not be able to access the form. How can I achieve this and any suggestions other than hiding is also welcome.
Thank you
Monday, June 30, 2014 4:53 PM
All replies
-
In form customization enable security role only for those security roles where you need. And put this user where you don't need access to other security roles
HTH
MaKeer | myencounterwithcrm.wordpress.com | CRM2011 User Settings Utility | CRM2011 Lookup Preview | CRM2011 Lookup Attribute Mapping | CRM2011 TreeView Control (Beta) | CRM2011 N:N Entity View (Beta) | CRM 2011 Global Quick Search (Beta)
Monday, June 30, 2014 7:04 PM -
Thanks.
What if there is a need to hide multiple sections in a form based on the lookup field values(or conditions) entered by the form owner in another form.
Do we need to javascript code? I have multiple conditions based on which I need to hide different sections of another form.
How can I achieve this?
Monday, June 30, 2014 7:12 PM -
What is form owner?
If you have to conditionally hide sections on form then, yes you have to write JavaScript code to hide section.
Following is syntax
sectionObj.setVisible(Boolean)
HTH
MaKeer | myencounterwithcrm.wordpress.com | CRM2011 User Settings Utility | CRM2011 Lookup Preview | CRM2011 Lookup Attribute Mapping | CRM2011 TreeView Control (Beta) | CRM2011 N:N Entity View (Beta) | CRM 2011 Global Quick Search (Beta)
Monday, June 30, 2014 7:19 PM -
in this case, there would be 2 parts,
1. On form onload check if logged in user is part of exclusion list
2. If user is part of exclusion list call following code for each section that needs to be hidden on form
sectionObj.setVisible(Boolean)
MaKeer | myencounterwithcrm.wordpress.com | CRM2011 User Settings Utility | CRM2011 Lookup Preview | CRM2011 Lookup Attribute Mapping | CRM2011 TreeView Control (Beta) | CRM2011 N:N Entity View (Beta) | CRM 2011 Global Quick Search (Beta)
Monday, June 30, 2014 8:21 PM -
Hi,
Please be aware that while the JavaScript approach will work for the form, the user will still be able to go through advanced find so see the information in the sections you are hiding.
If this is an issue, you will need to look into a more robust way of handling this.
~ Atomic Coder
Tuesday, July 1, 2014 1:08 AM -
Yeah that should be a big problem. I am wondering how to handle advanced find issue. Do you have any approach that you can suggest for me please? ThanksTuesday, July 1, 2014 12:43 PM
-
CRMProgrammer, you asked the same question already here:
As I replied in the other thread, the only way to enforce the data to don't be visible by advanced find is to use Field Level Security and eventually plugins.
Hiding sections or forms by JavaScript don't protect the data
My blog: www.crmanswers.net - Rockstar 365 Profile
Tuesday, July 1, 2014 12:53 PM