Fetch dependent pickList using custom settings in Lightning (code) not using field dependency option
1 answer
public class customSettingRRController { @AuraEnabled public static List<RR_Pattern_PickList__c> getListSettings(){ List<RR_Pattern_PickList__c> dList = new List<RR_Pattern_PickList__c>(); dList = RR_Pattern_PickList__c.getall().values(); String Week = dList[0].Weekly__c; system.debug('dList--'+dList); return dList; } }---<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" controller="customSettingRRController"> <aura:handler name="init" value="{!this}" action="{!c.myAction}" /> <aura:attribute name="optVal" type="List"/> <lightning:select name="select" label="Select a value"> <option value="">-- None --</option> <aura:iteration items="{!v.optVal}" var="op"> <option value="{!op.stage__c}" text="{!op.stage__c}"></option> </aura:iteration> </lightning:select> </aura:component>-----({ myAction : function(component, event, helper) { //get state when country populated- start var optionValue = component.get("c.getListSettings"); optionValue.setCallback(this, function(a) { component.set("v.optVal",a.getReturnValue()); }); $A.enqueueAction(optionValue); // end }})This code is for Controlling PickList which has values Weekly,Monthly but that is also not showing in list...