Skip to Content
Author's profile photo Suman Saurabh

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

  1. Login to the Silverlight UI.
  2. Go to the Administrator work center.
  3. Go to the General Settings view.
  4. Click on Code List Restrictions.
  5. Click on New button.
  6. In the pop-up, select the Business Object Opportunities; and Code to Restrict as APC_S_SALES_CYCLE_PHASE_CODE – Sales Phase.
  7. Select the Business Role to be assigned.
  8. Save & Open.
  9. 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).
  10. Save your changes.



Code_LIst_Restriction_Admin.JPG


New_CLR_Sales_Phase.JPG

Note: Please check the supported BOs in the Business Object field.


Restrict_Sales_Phase2.JPG


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.


Values_Sales_Phase.JPG

Use Case 2: Limit the Contract Period drop-down field based on the selection of the value in the Category field.


  1. Login to the Silverlight UI.
  2. Go to the Administrator work center.
  3. Go to the General Settings view.
  4. Click on Code List Restrictions.
  5. Click on New button.
  6. In the pop-up, select the Business Object Opportunities; and Code to Restrict as /BYD/A0014P0004AA093351A8B – Contract Duration.
  7. Select the Business Field radio button under Control Field.
  8. Select the business field Category.
  9. Select the Business Role to be assigned
  10. Save & Open.
  11. In the next screen, for the Category values (e.g. Prospect for Product Sales), uncheck all Contact Duration values except 24 Months.
  12. Save your changes.


CLR_ControlField.JPG


Contract_Category.JPG


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).


Control_Field_Values.JPG


Note: Please logout from the system & login again if the created code list does not work in the desired screen/UI.

Assigned tags

      19 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      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.

      Author's profile photo Former Member
      Former Member

      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?

      Author's profile photo Suman Saurabh
      Suman Saurabh
      Blog Post Author

      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.

      Author's profile photo Former Member
      Former Member

      Thanks a lot Suman, I will follow 🙂

      Author's profile photo Ginger Gatling
      Ginger Gatling

      Great stuff, thank you, Suman!

      Author's profile photo Former Member
      Former Member

      Nice blog, thanks Suman.

      Author's profile photo MOHD SIRAJUDDIN
      MOHD SIRAJUDDIN

      Very helpful information.

      Thanks for sharing Suman.

      Regards,

      Siraj.

      Author's profile photo Arian Zand
      Arian Zand

      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?

      Author's profile photo Suman Saurabh
      Suman Saurabh
      Blog Post Author

      Hi Arian,

      I tried the same scenario by creating a CLR.

      CLR.JPG

      The tested the CRL in Account -> It worked:

      Account1.JPG

      Opened the New Lead from Quick create -> Created the Lead.

      NewLead.JPG

      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

      Author's profile photo Suman Saurabh
      Suman Saurabh
      Blog Post Author

      Also make sure that you have assigned the Business Role in the Code List Restriction.

      Author's profile photo Former Member
      Former Member

      Hi Suman,

      what happens if you don't assign to the business role?

      Can we assign to more than 1 role?
      Best

      Linh

      Author's profile photo Suman Saurabh
      Suman Saurabh
      Blog Post Author

      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

      Author's profile photo Former Member
      Former Member

      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

      Author's profile photo Suman Saurabh
      Suman Saurabh
      Blog Post Author

      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

      Author's profile photo Aileen Sotelo
      Aileen Sotelo

      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

      Author's profile photo Mayank Khemka
      Mayank Khemka

      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

      Author's profile photo Mohit Sachdeva
      Mohit Sachdeva

      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

      Author's profile photo Chandara Chea
      Chandara Chea

      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,

       

       

      Author's profile photo MURUGESAN DEVARAJAN
      MURUGESAN DEVARAJAN

      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:

      When I create an Account with a Account type and Subtype in Quick view, and then in Overview
      screen I change the Account type .. the Subtype remains with the old value  and does not refresh as per CLR.
      Can you please suggest your views.
      Regards,
      Murugesan.