What is a Lookup field?
When you need a control on form, where you can
- Directly enter the recent/ most used items.
- Search for more records.
- Create a new record.
The only savior is “Lookup field“.
How to add a Lookup field?
Now we will see, how to add such field in our form. More specifically, I will be adding here Contact entity as the lookup field.
As depicted in below picture, it has the following stages –
- Go to Entity, to which you want to add the field. (e.g. Client)
- Select the Fields item, as shown here and click on “New” field from the page.
- Add the Display Name for new fields and set requirement as per you business requirement.
- Select the Data type = Lookup from the drop down.
- Select Target Record Type = Entity you want to see in lookup field (e.g. Contact)
- Relationship name field will have a default value, you can change it, though.
- Save and close this page.
- Go to form and add this field as you wish to.
- Save it and Publish it, now you can see Contact as lookup field in your form.
How does Lookup field work?
Lookup refers the primary field of the connected entity.
Getting familiar with lookup field
- You can just select the most recent or items already appearing in control.
- You can search for more records, on click of “Lookup more records” and it will open this screen, where
- You can’t change the Entity name in drop down list for Look for.
- Here you can search your record from all the views accessible to you.
- Your keyword for search will go here.
- You can select if you want to show all records or only created by you.
- You can refresh the search grid.
- It will open up new Main form for new entry.
- You can choose this record to be shown in control i.e. this is your required search result.
- It will open up the main form of selected record and then you can delete or perform some other activities over there.
- You can create a new entity record, just by clicking “+ New“. It will open Quick Create form to add the new record.
I hope this basic information about lookup fields, helps the beginner.
Happy Dynamics’ing !!!