We have a scenario where we need to search for any picklist which has a value 'Banking' in an organization. To find out this value, We are going to use Schema Class and Schema Namespace which has classes and methods to get the list of objects, fields and picklist values. Schema Class (from System Namespace) c ontains methods for obtaining schema describe information. Schema Namespace provides classes and methods for schema metadata information. To read more, check Schema Class and Schema Namespace Below is the sample code to search for a picklist value 'Banking' across the org. List < Schema.SObjectType > gd = Schema.getGlobalDescribe().Values(); for ( Schema.SObjectType f : gd ) { Schema.DescribeSObjectResult dsr = f.getDescribe(); Map<String , Schema.SObjectField > mapFieldList = dsr.fields.getMap(); for ( ...
Learn about Salesforce and Related Technologies