Sometimes you need to control which users can see or edit which company fields
You may want to show or hide company fields for some user groups, or have fields be editable or read-only for others, even mandatory just for some user groups.
To do this, you should use the Company view functionality:
Here is how to set it up (Example: we want the "Country" field to be mandatory for users of the type "Agent")
- Go to General - Settings - Company settings.
- See if there are any options called "Company views" and "View rules". If there are, then you can continue with point 3.
- Open the "Company views" page.
- Do one of these:
- Create a new view from scratch:
- Click "Add new view", and give the view a descriptive name, for example "Country mandatory".
- Open the new view. You will see a list of fields available, and none currently selected. Select the fields you want to use in the view.
- For the added fields, check if it is mandatory, as well as the permission (Read-only or Read/Write)
- Save the new view.
- Copy an existing company view and modify it:
Open the "View rules" page (view rules controls when you will see a given company view).
Click on "New rule" to create a new rule. These fields should be set:
- Select an existing company view and copy it by using the "Copy" icon to the right in the table. This creates a new view with the old name + "_COPY".
- Open the copied view. Change its name, and also select fields you want to add/remove to/from the view. You remove fields from the view by clicking on the red "X" for that row.
- Save the view after the changes are made.
Now, the company view rule should be in effect. (Using our example, Country should be mandatory for Agents).
- View rule - this is the Rule name. Add a descriptive name like "Country is mandatory for Agents"
- Company view - this is the view that the rule applies when it triggers. Select your new view ("Country mandatory") here.
- Performed for: Check these boxes whether this company view should be used when creating a new company, when viewing an existing company, or both.
- View rule criteria: Here, you set the criterias that controls when the company view should be shown. Currently there is only one option (but this should be improved in the future). The rule criteria that you can use is:
- "User group of currently logged on user" - Equals - value - (selected User group(s))
- Select the user groups for which the company rule should be used for. (For example "Agents")
- Save the view rule
This way, you have more control over which users can do what regarding Company fields.