Finding where dropdown lists are used

How can I find every field where a specific dropdown list is used?

  • If you are on site, or have an on site instance for your development environment, you can grep in the cache folder for all the vardefs.

    To find where a specific dropdown list name appears grep for the list's name. For example, I have a custom field for affiliation

    in <mysugar>/cache I can run

    grep -rl 'affiliation_list' modules/*/*vardef*

    and it returns all the vardef files where the dropdown is used:

    modules/Accounts/Accountvardefs.php

    modules/addlo_Address_Locations/addlo_Address_Locationsvardefs.php

    modules/Leads/Leadvardefs.php

    modules/Opportunities/Opportunityvardefs.php

    modules/pgopp_PartnershipOpportunities/pgopp_PartnershipOpportunitiesvardefs.php

    modules/Prospects/Prospectvardefs.php

    modules/Quotes/Quotevardefs.php

    modules/smgmt_Sales_Management/smgmt_Sales_Managementvardefs.php

    I can then look at each one and find where the dropdown is defined.

    For example in Accounts/Accountsvardefs.php

    I will find that list as 'options' in the 'affiliation_c' field.


    Hope this helps,

    Francesca

  • Hi  ,

    Within the application, there is no way to easily identify everywhere a dropdown list is used.  's advice is best if you have direct access to the server. 

    If you are hosted in SugarCloud or don't have direct access to the server hosting Sugar, our Upsert Lens plug-in provides a great tool for finding all fields within a given module using a dropdown list:

    The Vardef Lens also allows you to identify fields with other qualities too. If you need to find all fields that are required, calculated, read-only, etc., you are just a few clicks away from getting the info you need! Contact us via our website to get a demo or start a trial.

    Thanks!

    Chris