function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ScottB3ScottB3 

Get available options from lightning:inputfield

I have a lightning recordEditForm with an InputField that is a picklist
Is there any way of getting the number of options from that field, or does the Locker Service completely prevent me from doing anything useful?
<lightning:recordEditForm
  objectApiName="Case"
  aura:id="caseCreateForm">
                            
<lightning:inputField fieldName="Service_Area__c" aura:id="Service_Area__c" onchange="{!c.checkForOneOption}"/>

</lightning:recordEditForm>

In my onchange, I am trying to find how many options are in the field.  I cannot seem to figure out how to figure out to access anything though as it seems the Locker Service is preventing me from finding anything.
Alain CabonAlain Cabon
Hi,

You want to get the metadata definition of the field name Service_Area__c used for a specific case that can change according record types?