• knght4yshua
  • NEWBIE
  • 20 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 10
    Replies
Hey all,

I've read the other posts regarding this error and none of the solutions resolve my issue.  Here is the method in my Apex Class that is throwing the error:
 
@testVisible private static Map<Id, User> mAvailableMP {
	get {      
		if(mAvailableMP == null) {
			mAvailableMP = new Map<Id, User>();
			System.debug('SM_PROFILE_ID -----> '+SM_PROFILE_ID);
			List<User> lMP =
				[SELECT Id, Number_of_Assigned_Projects__c, Number_of_Peer_Audits_Assigned__c,Last_Project_Assigned_Date__c
				 FROM User 
				 WHERE Profile.Name = :MP_PROFILE
				 AND ProfileId != :SM_PROFILE_ID
				 AND UserRole.DeveloperName = :MP_REP_ROLE];               
			List<Availability__c> lOutOfOfficeAvailabilities =
				[SELECT OOO_Start_Date__c, OOO_End_Date__c 
				 FROM Availability__c
				 WHERE User__c IN :lMP 
				 AND OOO_Start_Date__c <= TODAY 
				 AND OOO_End_Date__c >= TODAY];          
			Set<Id> sOutOfOfficeUserIds = Pluck.ids('User__c', lOutOfOfficeAvailabilities);
			
			for(User u : lMP) {
				if(!sOutOfOfficeUserIds.contains(u.Id)) {
					mAvailableMP.put(u.Id, u);
				}
			}
		} 
		
		return mAvailableMP;
	}
	set;
}

For reference, here are the static variable assignments:
 
@testVisible private static final String MP_PROFILE = 'BCBSNC LG MP';

@testVisible private static final String MP_REP_ROLE = 'LG_MP_Reps';

@testVisible private static final Id SM_PROFILE_ID = [SELECT Id FROM Profile WHERE Name = 'SM User' LIMIT 1].Id;

When attempting the User query, to populate the lMP variable, I receive the System.QueryException error.  When debugging, the code definitely reaches the "System.debug('SM_PROFILE_ID -----> '+SM_PROFILE_ID);" line, but fails immediately after.  When running the same query in both Workbench and Dev Console I retrieve only a single record.  The User object DOES have over 200,000 records, BUT I am being selective in my query in three different ways, am I not?

​​​​​​​What is happening?
I have the following code:
 
<lightning:select aura:id="requestTypeSelect" 
                           name="requestTypeSelect" 
                           label="I'd like to: " 
                           required="true" 
                           value="{!v.requestTypeName}" 
                           onchange="{!c.setRequestTypeCmp}"
                           class="font">
The font size of the label "I'd like to:" is small and I'd like to increase it.  Changing the font in any way via a class, like "font" above, only changes the font within the select menu, not the label itself.

Is this possible?

Thanks!
 
Hello all!

I've searched the documentation, I've watched several demos/tutorials from Dreamforce/TrailheaDX online, and I haven't been able to find anything.  I have a Lightning component that has several children, and those children also have children.  Hosting the main parent component on the Community Home Page is easy enough.  But, I'd like to be able to click on an icon in the parent component and be taken to a completely different page in the Community.  

Again, creating new pages in the Community is simple.  Linking those pages via a navigation menu is also simple.  But, how do I pass an attribute from the parent component on the Home page, to a child component on a different page?  Example:  I have my main parent on the Home Page of the community.  I have a button on that main parent that, when clicked, displays a child component.  Through normal component code I am passing an attribute of the parent to the child.  I can then use that attribute value in the child component.

However, when that is done in a Lightning App, the url doesn't change when a new child component is displayed.  So, if the "Back" button in the browser is clicked, it won't go to the previous component, but it will go back to whatever page the browser was last on.  I can create a custom Back button to just reload the previous component, but I'd really like to have a different Url displayed in the browser's address bar.  That is where Communities and the different pages come in.  

I am not seeing a way to pass attributes from a component on one Community page to attributes on a different component on a different page.  

Is this possible?  If so, how?  Is there any documentation on how to accomplish this?

Thanks!
I have created a custom button on a custom object.  The button, when clicked, opens up a Visualforce Page, in which the Lightning Component is placed:
<apex:page docType="html-5.0" standardController="Business_Request__c" extensions="BusinessRequest_BRtoCaseController" showHeader="false" sidebar="false" standardStylesheets="false">
    <apex:stylesheet value="{!URLFOR($Resource.SLDS260, '/styles/salesforce-lightning-design-system.min.css')}"/>    
    <apex:includeScript value="{!$Resource.jQuery331}"/>
    <apex:includeLightning />    
    <apex:outputPanel layout="block">
        <div id="lightning"/>
    </apex:outputPanel>
    
    <!--Lightning Component--> 
    <script>
    
        var base = location.protocol+"//"+location.hostname+(location.port && ":"+location.port);
        var brRecordId = "{!recordId}";
        
        $Lightning.use("c:BusinessRequest_BRtoCaseDependencyApp", function() {
            $Lightning.createComponent("c:BusinessRequest_BRtoCase", 
                                       {
                                           recordId : brRecordId,
                                           baseUrl : base
                                       }, 
                                       "lightning", 
                                       function(component) {
                                       }); 
        });
    </script>
</apex:page>

The component (for which I cannot post the code, sorry) consists of a Lightning Design System modal, with a lightning:recordEditForm inside of it.  Once the form is filled out and saved, the Apex controller creates a related record and passes a success/fail boolean to the Lightning Helper.  

In the Helper I have the code written to show a Toast and automatically close the window after a timeout:
 
action.setCallback(this, function(response){
            var state = response.getState();  
            var caseCreated = Object.keys(response.getReturnValue())[0];
            var caseComCreated = Object.values(response.getReturnValue())[0];
               
            if(state === "SUCCESS" && caseCreated === "true" && caseComCreated === "true") {
                $A.util.addClass(component.find("messageType"),"slds-theme_success");
                $A.util.removeClass(component.find("successIcon"),"slds-hide");
                $A.util.removeClass(component.find("successMessage"),"slds-hide");
                this.showToastHp(component, true);
            }
}

(later in the code...)


       
    showToastHp : function (component, success){
        var $j = jQuery.noConflict();
        
        if(success){
                $j("#toastDiv").addClass('slds-show');
                $j("#toastDiv").removeClass('slds-hide');
            }
            else{
                $j("#toastDiv").addClass('slds-hide');
                $j("#toastDiv").removeClass('slds-show');
            }
        }

            setTimeout(function(){
                window.close();
            },4500);
    }

Now, the window itself closes just fine.  However, I need something else to happen as well.  I need the record on which the button was pushed to refresh/reload.  I've tried many different Javascript methods, but the one I think may work is prohibited by lightning (uses the "opener" syntax).

Is there any way to do this?
Never received a final response to my last question... really need to get this one working.  Can someone help?

I am getting this error and I don't know why:
Action failed: ui:inputSelect$controller$valueChange [Maximum call stack size exceeded]

COMPONENT CODE:
<aura:component access="global" controller="DependentPicklistTestController">
    <aura:attribute name="object" type="String"/>
    <aura:attribute name="controllingField" type="String"/>
    <aura:attribute name="dependentField" type="String"/>
    <aura:attribute name="selectedValue" type="String"/>
    <aura:attribute name="fieldName" type="String"/>
    <aura:attribute name="selectedDependentOption" type="String"/>
    <aura:attribute name="isDependentDisable" type="Boolean" default="false"/>
    <aura:handler name="init" value="{!this}" action="{!c.loadOptions}" /> 
    
    <ui:outputText value="{!v.fieldName}"/>:&nbsp;&nbsp;&nbsp;<ui:inputSelect aura:id="picklistOptions" 
                                                                              disabled="{!v.isDependentDisable}" 
                                                                              class="slds-input" 
                                                                              labelClass="slds-form-element__label"
                                                                              value="{!v.selectedOption}"
                                                                              required="true"
                                                                              onError="{!c.handleError}"
                                                                              onClearErrors="{!c.handleClearError}"/>
</aura:component>

JS CONTROLLER CODE:
({
	loadOptions : function(component, event, helper) {      
        helper.getOptionsHp(component, component.get("v.object"), component.get("v.controllingField"), component.get("v.dependentField"), component.get("v.selectedValue"));
    }
})

JS HELPER CODE:
({
    /*
     * Function to get all picklist values for a controlling/dependent pair
     */
    
    getOptionsHp: function(component, obj, controllingField, dependentField, selectedValue) {
        var optionValues = [];  
        var action;
        
        if(dependentField == "NULL"){            
        	action = component.get("c.getTopLevelOptionsApx");
            action.setParams({ 
                'obj' : obj,
                'field' : controllingField});
        }
        else{       
        	action = component.get("c.getOptionsApx"); 
            action.setParams({
                'obj' : obj,
                'controllingField' : controllingField,
                'dependentField' : dependentField});
        }
        action.setCallback(this, function(response) {
            var state = response.getState();  
            if (state === "SUCCESS" && !$A.util.isEmpty(response.getReturnValue()) && !$A.util.isUndefined(response.getReturnValue())) {  
                var returnedValues = response.getReturnValue();
                component.set("v.optionsMap",returnedValues);
                
                optionValues.push({
                    class: "optionClass",
                    label: "--- None ---",
                    value: "--- None ---",
                    selected: true
                });
                
                if($A.util.isUndefined(selectedValue) || $A.util.isEmpty(selectedValue) || selectedValue == "NULL"){
                    for(var i = 0; i < returnedValues.length; i++){
                        optionValues.push({
                            class: "optionsClass",
                            label: returnedValues[i],
                            value: returnedValues[i]
                        })
                    }
                }
                else{
                    for(var i = 0; i < Object.values(returnedValues[selectedValue]).length; i++){
                        optionValues.push({
                            class: "optionsClass",
                            label: Object.values(returnedValues[selectedValue])[i],
                            value: Object.values(returnedValues[selectedValue])[i]
                        })
                    }
                }
                
                component.find("picklistOptions").set("v.options",optionValues);
            }
            else if(state === "ERROR"){
                ('A problem occurred: ' + JSON.stringify(response.error));
            }
        });
        
        $A.enqueueAction(action);
    }
})

If I comment out this line the error goes away, but then again so does the information I need!:
 
component.find("picklistOptions").set("v.options",optionValues);

​APEX CONTROLLER CODE:
public class DependentPicklistTestController {
    
    /*
     * Retrieve all controlling and dependent picklist options
     */
    
    @AuraEnabled
    public static Map<String,List<String>> getOptionsApx(String obj, String controllingField, String dependentField){        
        Map<String,List<String>> optionsMap = new Map<String,List<String>>();
        DependentPicklistController dpc = new DependentPicklistController();
        optionsMap = dpc.getOptions(obj, controllingField, dependentField);       
        return optionsMap;
    }
    
    /*
     * Retrieve all picklist options for top-level fields (those which have no dependencies)
     */
    
    @AuraEnabled
    public static List<String> getTopLevelOptionsApx(String obj, String field){    
        List<String> options = new List<String>();        
        Schema.SObjectType objectType = Schema.getGlobalDescribe().get(obj);
        Map<String, Schema.SObjectField> fieldMap = objectType.getDescribe().fields.getMap();        
        Schema.DescribeFieldResult fieldResults = fieldMap.get(field).getDescribe();
        List<Schema.PicklistEntry> ples = fieldResults.getPicklistValues();        
        for(Schema.PicklistEntry ple : ples){
            options.add(ple.getValue());    
        }        
        return options;
    }
}

Any help you can provide is greatly appreciated!

Thanks!
Hey all, I'm getting the following error and I have no idea why:
 
Action failed: ui:inputSelect$controller$valueChange [Maximum call stack size exceeded]

COMPONENT CODE:
<aura:component access="global" controller="DependentPicklistTestController">
    <aura:attribute name="object" type="String"/>
    <aura:attribute name="controllingField" type="String"/>
    <aura:attribute name="dependentField" type="String"/>
    <aura:attribute name="selectedValue" type="String"/>
    <aura:attribute name="fieldName" type="String"/>
    <aura:attribute name="selectedDependentOption" type="String"/>
    <aura:attribute name="isDependentDisable" type="Boolean" default="false"/>
    <aura:handler name="init" value="{!this}" action="{!c.loadOptions}" /> 
    
    <ui:outputText value="{!v.fieldName}"/>:&nbsp;&nbsp;&nbsp;<ui:inputSelect aura:id="picklistOptions" 
                                                                              disabled="{!v.isDependentDisable}" 
                                                                              class="slds-input" 
                                                                              labelClass="slds-form-element__label"
                                                                              value="{!v.selectedOption}"
                                                                              required="true"
                                                                              onError="{!c.handleError}"
                                                                              onClearErrors="{!c.handleClearError}"/>
</aura:component>

CONTROLLER CODE:
({
	loadOptions : function(component, event, helper) {      
        helper.getOptionsHp(component, component.get("v.object"), component.get("v.controllingField"), component.get("v.dependentField"), component.get("v.selectedValue"));
    }
})

HELPER CODE:
({
    /*
     * Function to get all picklist values for a controlling/dependent pair
     */
    
    getOptionsHp: function(component, obj, controllingField, dependentField, selectedValue) {
        var optionValues = [];  
        var action;
        
        if(dependentField == "NULL"){            
        	action = component.get("c.getTopLevelOptionsApx");
            action.setParams({ 
                'obj' : obj,
                'field' : controllingField});
        }
        else{       
        	action = component.get("c.getOptionsApx"); 
            action.setParams({
                'obj' : obj,
                'controllingField' : controllingField,
                'dependentField' : dependentField});
        }
        action.setCallback(this, function(response) {
            var state = response.getState();  
            if (state === "SUCCESS" && !$A.util.isEmpty(response.getReturnValue()) && !$A.util.isUndefined(response.getReturnValue())) {  
                var returnedValues = response.getReturnValue();
                component.set("v.optionsMap",returnedValues);
                
                optionValues.push({
                    class: "optionClass",
                    label: "--- None ---",
                    value: "--- None ---",
                    selected: true
                });
                
                if($A.util.isUndefined(selectedValue) || $A.util.isEmpty(selectedValue) || selectedValue == "NULL"){
                    for(var i = 0; i < returnedValues.length; i++){
                        optionValues.push({
                            class: "optionsClass",
                            label: returnedValues[i],
                            value: returnedValues[i]
                        })
                    }
                }
                else{
                    for(var i = 0; i < Object.values(returnedValues[selectedValue]).length; i++){
                        optionValues.push({
                            class: "optionsClass",
                            label: Object.values(returnedValues[selectedValue])[i],
                            value: Object.values(returnedValues[selectedValue])[i]
                        })
                    }
                }
                
                component.find("picklistOptions").set("v.options",optionValues);
            }
            else if(state === "ERROR"){
                ('A problem occurred: ' + JSON.stringify(response.error));
            }
        });
        
        $A.enqueueAction(action);
    }
})

If I comment out this line the error goes away, but then again so does the information I need!:
 
component.find("picklistOptions").set("v.options",optionValues);

Any help you can provide is greatly appreciated!

Thanks!

 
I have the following code:
 
<lightning:select aura:id="requestTypeSelect" 
                           name="requestTypeSelect" 
                           label="I'd like to: " 
                           required="true" 
                           value="{!v.requestTypeName}" 
                           onchange="{!c.setRequestTypeCmp}"
                           class="font">
The font size of the label "I'd like to:" is small and I'd like to increase it.  Changing the font in any way via a class, like "font" above, only changes the font within the select menu, not the label itself.

Is this possible?

Thanks!
 
Hello all!

I've searched the documentation, I've watched several demos/tutorials from Dreamforce/TrailheaDX online, and I haven't been able to find anything.  I have a Lightning component that has several children, and those children also have children.  Hosting the main parent component on the Community Home Page is easy enough.  But, I'd like to be able to click on an icon in the parent component and be taken to a completely different page in the Community.  

Again, creating new pages in the Community is simple.  Linking those pages via a navigation menu is also simple.  But, how do I pass an attribute from the parent component on the Home page, to a child component on a different page?  Example:  I have my main parent on the Home Page of the community.  I have a button on that main parent that, when clicked, displays a child component.  Through normal component code I am passing an attribute of the parent to the child.  I can then use that attribute value in the child component.

However, when that is done in a Lightning App, the url doesn't change when a new child component is displayed.  So, if the "Back" button in the browser is clicked, it won't go to the previous component, but it will go back to whatever page the browser was last on.  I can create a custom Back button to just reload the previous component, but I'd really like to have a different Url displayed in the browser's address bar.  That is where Communities and the different pages come in.  

I am not seeing a way to pass attributes from a component on one Community page to attributes on a different component on a different page.  

Is this possible?  If so, how?  Is there any documentation on how to accomplish this?

Thanks!
I have created a custom button on a custom object.  The button, when clicked, opens up a Visualforce Page, in which the Lightning Component is placed:
<apex:page docType="html-5.0" standardController="Business_Request__c" extensions="BusinessRequest_BRtoCaseController" showHeader="false" sidebar="false" standardStylesheets="false">
    <apex:stylesheet value="{!URLFOR($Resource.SLDS260, '/styles/salesforce-lightning-design-system.min.css')}"/>    
    <apex:includeScript value="{!$Resource.jQuery331}"/>
    <apex:includeLightning />    
    <apex:outputPanel layout="block">
        <div id="lightning"/>
    </apex:outputPanel>
    
    <!--Lightning Component--> 
    <script>
    
        var base = location.protocol+"//"+location.hostname+(location.port && ":"+location.port);
        var brRecordId = "{!recordId}";
        
        $Lightning.use("c:BusinessRequest_BRtoCaseDependencyApp", function() {
            $Lightning.createComponent("c:BusinessRequest_BRtoCase", 
                                       {
                                           recordId : brRecordId,
                                           baseUrl : base
                                       }, 
                                       "lightning", 
                                       function(component) {
                                       }); 
        });
    </script>
</apex:page>

The component (for which I cannot post the code, sorry) consists of a Lightning Design System modal, with a lightning:recordEditForm inside of it.  Once the form is filled out and saved, the Apex controller creates a related record and passes a success/fail boolean to the Lightning Helper.  

In the Helper I have the code written to show a Toast and automatically close the window after a timeout:
 
action.setCallback(this, function(response){
            var state = response.getState();  
            var caseCreated = Object.keys(response.getReturnValue())[0];
            var caseComCreated = Object.values(response.getReturnValue())[0];
               
            if(state === "SUCCESS" && caseCreated === "true" && caseComCreated === "true") {
                $A.util.addClass(component.find("messageType"),"slds-theme_success");
                $A.util.removeClass(component.find("successIcon"),"slds-hide");
                $A.util.removeClass(component.find("successMessage"),"slds-hide");
                this.showToastHp(component, true);
            }
}

(later in the code...)


       
    showToastHp : function (component, success){
        var $j = jQuery.noConflict();
        
        if(success){
                $j("#toastDiv").addClass('slds-show');
                $j("#toastDiv").removeClass('slds-hide');
            }
            else{
                $j("#toastDiv").addClass('slds-hide');
                $j("#toastDiv").removeClass('slds-show');
            }
        }

            setTimeout(function(){
                window.close();
            },4500);
    }

Now, the window itself closes just fine.  However, I need something else to happen as well.  I need the record on which the button was pushed to refresh/reload.  I've tried many different Javascript methods, but the one I think may work is prohibited by lightning (uses the "opener" syntax).

Is there any way to do this?
Never received a final response to my last question... really need to get this one working.  Can someone help?

I am getting this error and I don't know why:
Action failed: ui:inputSelect$controller$valueChange [Maximum call stack size exceeded]

COMPONENT CODE:
<aura:component access="global" controller="DependentPicklistTestController">
    <aura:attribute name="object" type="String"/>
    <aura:attribute name="controllingField" type="String"/>
    <aura:attribute name="dependentField" type="String"/>
    <aura:attribute name="selectedValue" type="String"/>
    <aura:attribute name="fieldName" type="String"/>
    <aura:attribute name="selectedDependentOption" type="String"/>
    <aura:attribute name="isDependentDisable" type="Boolean" default="false"/>
    <aura:handler name="init" value="{!this}" action="{!c.loadOptions}" /> 
    
    <ui:outputText value="{!v.fieldName}"/>:&nbsp;&nbsp;&nbsp;<ui:inputSelect aura:id="picklistOptions" 
                                                                              disabled="{!v.isDependentDisable}" 
                                                                              class="slds-input" 
                                                                              labelClass="slds-form-element__label"
                                                                              value="{!v.selectedOption}"
                                                                              required="true"
                                                                              onError="{!c.handleError}"
                                                                              onClearErrors="{!c.handleClearError}"/>
</aura:component>

JS CONTROLLER CODE:
({
	loadOptions : function(component, event, helper) {      
        helper.getOptionsHp(component, component.get("v.object"), component.get("v.controllingField"), component.get("v.dependentField"), component.get("v.selectedValue"));
    }
})

JS HELPER CODE:
({
    /*
     * Function to get all picklist values for a controlling/dependent pair
     */
    
    getOptionsHp: function(component, obj, controllingField, dependentField, selectedValue) {
        var optionValues = [];  
        var action;
        
        if(dependentField == "NULL"){            
        	action = component.get("c.getTopLevelOptionsApx");
            action.setParams({ 
                'obj' : obj,
                'field' : controllingField});
        }
        else{       
        	action = component.get("c.getOptionsApx"); 
            action.setParams({
                'obj' : obj,
                'controllingField' : controllingField,
                'dependentField' : dependentField});
        }
        action.setCallback(this, function(response) {
            var state = response.getState();  
            if (state === "SUCCESS" && !$A.util.isEmpty(response.getReturnValue()) && !$A.util.isUndefined(response.getReturnValue())) {  
                var returnedValues = response.getReturnValue();
                component.set("v.optionsMap",returnedValues);
                
                optionValues.push({
                    class: "optionClass",
                    label: "--- None ---",
                    value: "--- None ---",
                    selected: true
                });
                
                if($A.util.isUndefined(selectedValue) || $A.util.isEmpty(selectedValue) || selectedValue == "NULL"){
                    for(var i = 0; i < returnedValues.length; i++){
                        optionValues.push({
                            class: "optionsClass",
                            label: returnedValues[i],
                            value: returnedValues[i]
                        })
                    }
                }
                else{
                    for(var i = 0; i < Object.values(returnedValues[selectedValue]).length; i++){
                        optionValues.push({
                            class: "optionsClass",
                            label: Object.values(returnedValues[selectedValue])[i],
                            value: Object.values(returnedValues[selectedValue])[i]
                        })
                    }
                }
                
                component.find("picklistOptions").set("v.options",optionValues);
            }
            else if(state === "ERROR"){
                ('A problem occurred: ' + JSON.stringify(response.error));
            }
        });
        
        $A.enqueueAction(action);
    }
})

If I comment out this line the error goes away, but then again so does the information I need!:
 
component.find("picklistOptions").set("v.options",optionValues);

​APEX CONTROLLER CODE:
public class DependentPicklistTestController {
    
    /*
     * Retrieve all controlling and dependent picklist options
     */
    
    @AuraEnabled
    public static Map<String,List<String>> getOptionsApx(String obj, String controllingField, String dependentField){        
        Map<String,List<String>> optionsMap = new Map<String,List<String>>();
        DependentPicklistController dpc = new DependentPicklistController();
        optionsMap = dpc.getOptions(obj, controllingField, dependentField);       
        return optionsMap;
    }
    
    /*
     * Retrieve all picklist options for top-level fields (those which have no dependencies)
     */
    
    @AuraEnabled
    public static List<String> getTopLevelOptionsApx(String obj, String field){    
        List<String> options = new List<String>();        
        Schema.SObjectType objectType = Schema.getGlobalDescribe().get(obj);
        Map<String, Schema.SObjectField> fieldMap = objectType.getDescribe().fields.getMap();        
        Schema.DescribeFieldResult fieldResults = fieldMap.get(field).getDescribe();
        List<Schema.PicklistEntry> ples = fieldResults.getPicklistValues();        
        for(Schema.PicklistEntry ple : ples){
            options.add(ple.getValue());    
        }        
        return options;
    }
}

Any help you can provide is greatly appreciated!

Thanks!
Hey all, I'm getting the following error and I have no idea why:
 
Action failed: ui:inputSelect$controller$valueChange [Maximum call stack size exceeded]

COMPONENT CODE:
<aura:component access="global" controller="DependentPicklistTestController">
    <aura:attribute name="object" type="String"/>
    <aura:attribute name="controllingField" type="String"/>
    <aura:attribute name="dependentField" type="String"/>
    <aura:attribute name="selectedValue" type="String"/>
    <aura:attribute name="fieldName" type="String"/>
    <aura:attribute name="selectedDependentOption" type="String"/>
    <aura:attribute name="isDependentDisable" type="Boolean" default="false"/>
    <aura:handler name="init" value="{!this}" action="{!c.loadOptions}" /> 
    
    <ui:outputText value="{!v.fieldName}"/>:&nbsp;&nbsp;&nbsp;<ui:inputSelect aura:id="picklistOptions" 
                                                                              disabled="{!v.isDependentDisable}" 
                                                                              class="slds-input" 
                                                                              labelClass="slds-form-element__label"
                                                                              value="{!v.selectedOption}"
                                                                              required="true"
                                                                              onError="{!c.handleError}"
                                                                              onClearErrors="{!c.handleClearError}"/>
</aura:component>

CONTROLLER CODE:
({
	loadOptions : function(component, event, helper) {      
        helper.getOptionsHp(component, component.get("v.object"), component.get("v.controllingField"), component.get("v.dependentField"), component.get("v.selectedValue"));
    }
})

HELPER CODE:
({
    /*
     * Function to get all picklist values for a controlling/dependent pair
     */
    
    getOptionsHp: function(component, obj, controllingField, dependentField, selectedValue) {
        var optionValues = [];  
        var action;
        
        if(dependentField == "NULL"){            
        	action = component.get("c.getTopLevelOptionsApx");
            action.setParams({ 
                'obj' : obj,
                'field' : controllingField});
        }
        else{       
        	action = component.get("c.getOptionsApx"); 
            action.setParams({
                'obj' : obj,
                'controllingField' : controllingField,
                'dependentField' : dependentField});
        }
        action.setCallback(this, function(response) {
            var state = response.getState();  
            if (state === "SUCCESS" && !$A.util.isEmpty(response.getReturnValue()) && !$A.util.isUndefined(response.getReturnValue())) {  
                var returnedValues = response.getReturnValue();
                component.set("v.optionsMap",returnedValues);
                
                optionValues.push({
                    class: "optionClass",
                    label: "--- None ---",
                    value: "--- None ---",
                    selected: true
                });
                
                if($A.util.isUndefined(selectedValue) || $A.util.isEmpty(selectedValue) || selectedValue == "NULL"){
                    for(var i = 0; i < returnedValues.length; i++){
                        optionValues.push({
                            class: "optionsClass",
                            label: returnedValues[i],
                            value: returnedValues[i]
                        })
                    }
                }
                else{
                    for(var i = 0; i < Object.values(returnedValues[selectedValue]).length; i++){
                        optionValues.push({
                            class: "optionsClass",
                            label: Object.values(returnedValues[selectedValue])[i],
                            value: Object.values(returnedValues[selectedValue])[i]
                        })
                    }
                }
                
                component.find("picklistOptions").set("v.options",optionValues);
            }
            else if(state === "ERROR"){
                ('A problem occurred: ' + JSON.stringify(response.error));
            }
        });
        
        $A.enqueueAction(action);
    }
})

If I comment out this line the error goes away, but then again so does the information I need!:
 
component.find("picklistOptions").set("v.options",optionValues);

Any help you can provide is greatly appreciated!

Thanks!