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

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:inputField fieldName="Service_Area__c" aura:id="Service_Area__c" onchange="{!c.checkForOneOption}"/>


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

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?