How to Set Table View Preferences Based on User Groups
available since version 16.0
View Preferences for the tables on the Items tab of CLIC documents can be automatically loaded based on user groups. The setting is done in the JSON configuration of CLIC header types (Quote Type, Rebates & Agreements Type, Rebate Agreement Type or Compensation Type).
For each header type, you can define conditional preference types (collection of view preferences) and a default preference type. You can define preference types for the Items table and the Product, Product Group, Customer and Customer Group pickers.
How it works
When you define a preference type for a user group in the JSON configuration, users belonging to this group will see only the view preferences associated with this type. When a user belonging to this user group opens a document (e.g., Quote) creates and saves a view preference, this preference will be associated with the preference type defined for this user group. The user will also see all other view preferences created by other users belonging to the same group.
Conditional preference types are ordered by priority in the JSON configuration and each has one or more user groups assigned.
At runtime, conditional preference types are evaluated in order; the system uses the first conditional preference type where at least one assigned user group matches the current user’s group.
If no conditional preference type matches, the default preference type for that header type is used.
If no default is defined, the global default view preference is used. This view preference is set in the UI, in the tables Show Table Settings menu.
In the following example JSON configuration, you can see a conditional preference type for the Items tab and an incorrect definition of product picker preferences.
{
"tabs": {
...
},
"buttons": {
...
}
"preferences": {
"itemsTable": [ // Preference for CLIC detail items table. The order is important, configuration which is placed higher has higher priority.
{
"label": "user defined label",
"preferenceType": "MySavedPreference1", // Name of the preference type which will be used for the below defined user groups.
"userGroups": ["userGroup1", "userGroup2"] // The above preference type will only be applied if the current user is a member of any of these user groups.
},
{
"label": "label of the default preference defined by Header Type",
"preferenceType": "DefaultPreference" // This is the default preference for this header type
}
],
"customerPicker": [
...
],
"customerGroupPicker": [], // For an empty array or undefined property, the global default will be used, in this case CustomerGroupPicker
"productPicker": [ // The order is important!
{
"label": "Default Product Picker",
"preferenceType": "productPickerDefaultPreference"
},
{ // This will be never applied because the first matching type is returned and "Default Product Picker" will always be matching
"label": "UserGroup specific Product Picker",
"preferenceType": "productPickerDefaultPreference"
"userGroups": [ 'Group1', 'Group2' ]
}
],
"productGroupPicker": [
...
]
}
}Found an issue in documentation? Write to us.