You need to sign in to do that
Don't have an account?
Brooke Baker
lightning:recordEditForm - lightning:inputField - Lookups not working in Salesforce1
Does anyone know how to get the inputfield for a reference field/lookup working on Salesforce1.
Ive built a custom componet with a recordEditform that is launched from an object action button and shows the lookups correctly. But in Salesforce1 it shows just a input text fields.
Ive built a custom componet with a recordEditform that is launched from an object action button and shows the lookups correctly. But in Salesforce1 it shows just a input text fields.
This is not supported yet by recordEditForm.
Look at the below description from component library.
https://developer.salesforce.com/docs/component-library/bundle/lightning:recordEditForm/documentation
Usage Considerations
The lookup type is supported in Lightning Experience only. When used in the mobile app, the lookup type is rendered as an input text field. The geolocation compound field is not supported. Read-only fields are displayed as input fields that are disabled.
Thanks
Ankur
Yoi can use force:inputField as a workaround as shown below:
<aura:attribute name="contactObj" type="Account" default="{ 'sobjectType': 'Contact' }"/>
<force:inputField value="{!v.contactObj.AccountId}"/>
I tried using force:inputField in my lightning component and It is working fine for a quick action, however the same is not working when I am using the same lightning component in a VF using LightningOut. Any idea what could be the possible cause of this?
P.S. I am using it in Salesforce1.
Thanks,
Mohammad Anis
force:inputField doesn't support when a component is imbedded under a VF page.
Hi Anis, unfortunately you will need to use custom lookup component to achieve your requirement.
You can refer - https://sfdcmonkey.com/2017/07/17/re-usable-custom-lookup/
Thanks.
The issue is the VF page that too on Salesforce1, else Salesforce1 supports both force:inputField and the custom lookup component.