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
chocoholicchocoholic 

Custom Field Search from Lookup Dialogue

Is it possible to include custom object fields when searching using the lookup window?  I have a number of custom objects that use an auto-number for the object name, however searching for these objects is near impossible when I want to link them to another object by selecting the lookup magnifying glass.

 

I've found several different solutions that suggest that this could be done, however I am unable to get a successful result.  Any help would be appreciated

werewolfwerewolf
Have you tried turning on Enhanced Lookups for that object?
chocoholicchocoholic

Yes I have with no success. 

 

Some more details around what I'm trying to achieve and have already tried (simplified):

 

Objects I have:

 * Project

 * Employee

 * Assignment

 * Timesheet

 

 An assignment is a relationship between the Project and the Employee, and has an auto number unique id.  The assignment contains information about that employee's engagement on a project such as duration and charge rates.  When an employee creates a "timesheet" they need to select the assignment associated with the time they are recording, however by selecting the lookup magnifying glass, it only give the option of searching for the auto number (which means nothing).  I want to be able to search by employee name and/or project name to get the assignment that is required.

 

I have created both Employee Name and Project Name as external IDs on the assignment object.  Searching for 'Joe Blogs' from the side bar search works fine (shows both the employee record and the assigment records that the employee is associated with).

 

I have also enabled enhanced lookup for the assignment object but this still does not return any results when searching for 'Joe Blogs' from the lookup dialogue.  (However the instructions I found for this were very limited so it may not have been set up correctly)

 

Thanks in advance

werewolfwerewolf
How about using a workflow field update to set a custom field on the Assignment to the project name?  Then enhanced lookups would find it.
chocoholicchocoholic
That's what (I thought) I had done... but it doesn't work.  It still only searches on the Assignment IDs
werewolfwerewolf
Perhaps you had made a formula field?  What I'm referring to is making a regular field and then setting it using a workflow field update.  That should get indexed whereas formula fields do not.
h_lister76h_lister76

I've set up a hidden field on my custom object to store the text from the Description field using a workflow rule field update.  Both the hidden field and the Description field are set as External ID and I have turned on enhanced lookups for the custom object.  This works great for searching from the sidebar, but still doesn't work in a lookup search when using text from the Description field versus the ID field.

 

Any other suggestions or other things I need to set up to get this to work?

 

iownrocknrolliownrocknroll

I am having the same issue.

They do not state in the documents that it will not work if enhanced lookup is enabled.

 

it seems like they do not get indexed

SusanKSusanK

In both standard and enhanced lookups, only the name field for the object is searchable, whereas with sidebar and advanced search, many more fields are indexed for search, depending on object and type.  That's why you are not able to search the additional fields you have added when you do a lookup search.

 

One thing that may help is to use enhanced lookups and add filters to the lookup dialog.  Those filters can be on any field on the object, including formula fields and text fields.

magdielhfmagdielhf

Can anyone post how to add these additional filters to the enhanced lookup filters ?