0

I need to implement a combobox like on the next img:

lightning combobox with interactions

Until now Im using this line of code:

<lightning:inputField variant="label-stacked" fieldName="Contact"/>

I have read the whole documentation I Found, But cant find the way to see the "New Contact" option who shows a form to add a new Contact.

Thanks a lot for your help.

PD: I took the image from other stackexchange question to help me to explain what I need.

* ############## Edit 1: ##############################*

I need to add the next information: I have a form with some fields. This field in particular is not part of the "tobe saved" object but I need this field to do something in the controller.

My real need is just have a combobox/select who shows the available records and show the option "New Object" to add a new one if the availables are not enough.

I was reading the documentation and cant find salesforce out of the box implementations.

1 Answer 1

1

lightning:inputField doesn't support new Record creation feature, if you need new record creation function you should use force:inputField component it uses UI API check out my answer here

2
  • THanks for your contribution! i'll check it con monday and mention de result. Aug 2, 2019 at 23:08
  • sdandamud1 i just tested your idea, but i've just realized that this field is not part of my customObject where i need to store the selected value. I Edited my Cuestion Aug 2, 2019 at 23:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .