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
Saju NathSaju Nath 

How to display all the data in the look up for a Related field

How to get all the data in the look up for the related field? Now i am able to see only one field i.e, Id but i need entire data.
AshlekhAshlekh
HI,

Could you please let us know what you actually want to achive.

-Thanks
Ashlekh Gera
Saju NathSaju Nath
Hi AKG,

Actually what i required is
I am using a picklist and based on the pick list value i am able to populate the records in Look Up. But i am getting only id from the related field but i required all the data which is displayed on the page for the particular selected value.
Krishna SambarajuKrishna Sambaraju
Go to your object, find Search Layouts, then find the Look Dialogs. Edit the Look Dialogs, select the fields needed and add them. The fields should will then be visible in the lookup dialog when opened.

Hope this helps.
Saju NathSaju Nath
Thanks Krishna For Response.

I followed the same steps what you mentioned, but the selected value is Name and after saving it is changed to Id. So can you please let me know how to fix this issue.
Krishna SambarajuKrishna Sambaraju
When you create records without entering the name, the id is stored in the name field. Are you the Name field is not left blank when creating the records?
Saju NathSaju Nath
I am Selecting the name value from the look up and saving, after saving it is automatically changing to Id.
Krishna SambarajuKrishna Sambaraju
A lookup field always stores the Id value of the lookp record and displays the name on the UI. I am not sure what exactly you are looking for. Can you share some screenshots, so that I have an idea of what you are trying to do.
Saju NathSaju Nath
1. Selecting the Value from the Look up. 

Selecting the value from the look up

2. Selected value from the Look Up

User-added image

3. After Saving, the PLU Name value is getting chaged to its id.

User-added image
Krishna SambarajuKrishna Sambaraju
Is the Name field on the PLU lookup object an Auto-Number field. Can you share the configuration of the Name field of your PLU lookup object.
Saju NathSaju Nath
Yes the Id is an Auto Number Field.
Krishna SambarajuKrishna Sambaraju
Can you share the Name field configuration and lookup dialog config of your PLU object?
Krishna SambarajuKrishna Sambaraju
If your name field is an auto number field, you should see this field in the lookup dialog with the value "MAP-0873" in the first column of the lookup dialog, but the value "ADOPTM" is being shown. Can you execute the following query in your "Developer Console" 

SELECT NAME FROM YOUR_OBJECT LIMIT 10 (please add other fields of this object as well in the query) and share a screenshot of the results. I want to check which field is storing the value "ADOPTM" and which field is storing the value "MAP-0873".
Saju NathSaju Nath
After executing the query i am getting the response as below.

User-added image
I need the value PLU__c in the Display Field.
Krishna SambarajuKrishna Sambaraju
The lookup will always display the name field. I am not sure how you managed the Lookup without the Name field and instead used the PLU field.
Krishna SambarajuKrishna Sambaraju
If you want the values in the PLU field to be displayed, then those values need to be in the Name field. Make the Name field as a Text field and make the PLU field as Auto number, then it will work as you expect.