I'm trying to implement a component with lookup fields. The form is to be created dynamically. I tried the following ways :

Approach 1

Using <lightning:inputField> with <lightning:recordEditForm>. The component is working fine in org but it's not populating the record search window in the community(popup appears after clicking the "search 'xyz value' in 'object name'" below the lookup field). I think it may be some salesforce issue as the code breaking when I click on search option. Also, there are some fields which are having lookup filter. And this also not working in the community as well as in org. So, changed the approach to next.

Approach 2

Using LDS. But soon after I came to know as of now LDS is not supported in community

Again I need to change the approach.

Approach 3(but least interested)

Using custom lookup fields. As the number of lookup fields is not fixed(may vary up to 10). I think this approach may affect the overall performance of the component, as this complete problem is just a part of my component. Least interested to solve this way.

For approach 1 reference please see this and error encountered

Is there any better approach to proceed?


Beloew is the code I used in approach 1.

          <lightning:messages />
          <aura:iteration items="{!v.FieldAPINames}" var="i">                                    
                <lightning:inputField fieldName="{!i}" aura:id="editFormField"/>
          <lightning:button variant="brand" type="submit" name="save" label="Save" class=" slds-float_right slds-m-top_medium"/>
  • Hi there, Happy new year! As written, the questions is opinion-based and fairly broad. I'd recommend you pick an approach and post the relevant code, then we (the community) can help you get unstuck and get your question solved. – Sebastian Kessel Jan 2 at 18:15
  • Hi @Sebastian Kessel, please refer the edited section for the code I used. – VDahiya Jan 2 at 18:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.