How to Use Code List Restrictions to Control Dropdown Field Values
Code List Restriction:
To restrict displaying certain code values for a specific set of users, you can maintain code list restrictions. You can define these restrictions for a combination of the following values: Business Object, Code Type, Business Role and Control Field.
Scenario:
You want to restrict 3 drop-down fields of the opportunity for a particular business role.
– Limit the drop-down values of Sales Phase field.
– Limit the Contract Period drop-down field based on the selection of the value in the Category field.
Use Case 1: Limit the drop-down values of Sales Phase field
- Login to the Silverlight UI.
- Go to the Administrator work center.
- Go to the General Settings view.
- Click on Code List Restrictions.
- Click on New button.
- In the pop-up, select the Business Object Opportunities; and Code to Restrict as APC_S_SALES_CYCLE_PHASE_CODE – Sales Phase.
- Select the Business Role to be assigned.
- Save & Open.
- In the next screen, uncheck the sales phase value which should not be available for the business role (e.g. Identify opportunity, Qualify opportunity & Close).
- Save your changes.
Note: Please check the supported BOs in the Business Object field.
Now with this restriction the user assigned to the business role will not be able to find the Identify opportunity, Qualify opportunity and Close in the value help of the Sales Phase field in opportunity.
Use Case 2: Limit the Contract Period drop-down field based on the selection of the value in the Category field.
- Login to the Silverlight UI.
- Go to the Administrator work center.
- Go to the General Settings view.
- Click on Code List Restrictions.
- Click on New button.
- In the pop-up, select the Business Object Opportunities; and Code to Restrict as /BYD/A0014P0004AA093351A8B – Contract Duration.
- Select the Business Field radio button under Control Field.
- Select the business field Category.
- Select the Business Role to be assigned
- Save & Open.
- In the next screen, for the Category values (e.g. Prospect for Product Sales), uncheck all Contact Duration values except 24 Months.
- Save your changes.
Now with this restriction if the user assigned to the business role selects the Category as Prospect for Product Sales in the opportunity then the Contract field only shows the option to select 24 Months (all other values will not be shown in the drop-down due to the applied code list restriction).
Note: Please logout from the system & login again if the created code list does not work in the desired screen/UI.
Hi,
Very useful and helpful document about basic acknowledge understanding for code list restriction.
Thanks I also refer this document for project requirement it works well.
Very nicely put. DO I need to write to someone for written permission to copy some info from the above, specifically the 10 steps along with a few screenshots?
You can use the content.
The best would be to bookmark this blog or perform similar steps in your C4C system and create a documentation.
Thanks a lot Suman, I will follow 🙂
Great stuff, thank you, Suman!
Nice blog, thanks Suman.
Very helpful information.
Thanks for sharing Suman.
Regards,
Siraj.
Hi Suman,
I have a question regarding code list restriction.
I have made 2 custom fields (market group and market) where marketgroup field is dependable from market on the account object.
Assume market has values: A1,A2,A3,B1,B2,C,D,E and F and marketgroup: AA,BB,CC,DD,EE,FF
When in market A1,A2 or A3 is selected the field marketgroup should only show the value AA
When in market B1 or B2 is selected the field marketgroup should only show the value BB
For C the field market should only show CC
And so on…
I used code list restriction in order to let this functionality work and it does work fine for Accounts.
When I test this functionality and I switch my screen to a new lead (quick create). The code list restriction on the Account object does not work anymore.
I made an incident for this issue within SAP but I never got response.
Are you aware of this issue?
Hi Arian,
I tried the same scenario by creating a CLR.
The tested the CRL in Account -> It worked:
Opened the New Lead from Quick create -> Created the Lead.
Then tried to check the CLR again -> It worked for me.
Note: If in some cases the value help for Market Group does not fetch the correct value, then reselect the value in Market field and check the values in Market Group.
I also have checked the incident reported by you, this was send back to you as you were not available for the call, in case the issue still occurs for you, re-open the incident and update your contact details in the incident.
Regards,
Suman
Also make sure that you have assigned the Business Role in the Code List Restriction.
Hi Suman,
what happens if you don't assign to the business role?
Can we assign to more than 1 role?
Best
Linh
Hi Linh,
Sorry for late response.
what happens if you don't assign to the business role?
- If you do not assign the Business Role then the Code List Restriction will not work for users. This restriction is meant for the users assigned to the Business Role.
Can we assign to more than 1 role?
No, you cannot assign more than one Business Role.
Regards,
Suman
Thanks Suman. This clear out a lot of my concern.
One more question related to this.
Can an extension field a control field for a standard field?
Best
Linh
Hi Linh,
Yes, an extension field can be a control field for a standard field.
Select a standard field in "Code to Restrict", then under "CONTROL FIELD" - > Select the radio button for "Extension Field" -> choose the extension field.
Regards,
Suman
Hi,
I did code list restriction
When I go to Add new Address, it is functioning well
But when I go to edit mode, it is not functioning
Thank you,
Aileen
Hi Aileen,
I think there is some misunderstanding. As i can see you have maintained the code list restriction with city as code to restrict field and Province as control field, as per your restriction if you will select 'La Union' in Province, then you will be able to see only AGOO and ARINGY in city field, and if you will select 'IIlcos' in Province, then you will be able to see ADAMS in city field.
Best Regards,
Mayank
Hi Suman,
I have a requirement to limit the drop down values of a field based on a selection in the same field. For Example, a drop down field has 5 values: A,B,C,D,E. If A is selected, only C and D is visible or if C is selected then only E is visible.
Can you tell me how to achieve such behaviour.
Regards,
Mohit
Hi!
Thank you for this great post. I have a question regarding this list restriction behaviour. In your post, you untick the box for the value Close. However, I can see that it still appear in Sale Phase although user can't select it from dropdown. I have also this same problem with the ticket type. Hence, is there possibility to hide that Close value completely?
BR,
Hi Suman,
We are facing one issue on the code list restriction on the Account BO.
In Account BO we maintained one CLR based on the Account Type value the Account sub Type need to show. But it is not working as per expectation.
Example: