Skip to main content

Posts

Showing posts with the label Picklist dependency in Apex

Generic Class to get Dependency of Dependent Pick-list In Apex

Dependent Picklist values Dependency Dependent Picklist values do not have any dependency when retrieved via Apex Code. This Following Class will returned a map which has Key as Controlling Values and Values are the list of dependent values(In LowerCase). Map Key =  Controlling Values, Map Values = list of dependent values. Class:- /***********************-- START --****************************** **/ /** * @File Name          : DependencyForPicklistApex.cls * @Description        : CR-DR * @Author             : Devraj Tomar * @Group              : DR Groups * @Last Modified By   : Devraj Tomar * @Modification Log   :  **/ public class DependencyForPicklistApex {          public static Map<String, Set<String>> getFieldDependencies(String objectName, String controllingField, String dependentField){         Map<String, Set<String>> controllingInfo = new Map<String, Set<String>>();         Schema.SObjectType objType = Schema.getGlobalD

Translate