top of page
Writer's pictureChris

Flipping the unofficial Lookup Component

Updated: Jan 29, 2020

The Unofficial Lookup component from the unofficial Salesforce site is one of my favorite components. It allows you to add a powerful search component to your screen flow. However, the component is one of the oldest on the site, and some very picky users in my organization kept asking me, "Why are the icons not aligned correctly?" during user acceptance testing. Therefore, I decided it could use a new layer of paint.


What was changed?

  1. Used lightning design system to format the search box

  2. Used lightning design system to format the search results

  3. Used lightning design system to format the selected results

  4. Added the ability to add icons

The Results

Go from this

To this

Now it's your turn!

  1. Log into a sandbox or developer org

  2. Install the latest version of the unofficial Lookup component

  3. Open the developer console

  4. Open the files below, and update them with the code below


Open c:lookupFSC

Update Component File

Update Design File

Update Controller and Helper File

Open c:CmpPills.cmp

Update Component File

Open c:LightningLookup

Update Component File

Update Style file

 

Resources

927 views17 comments

Recent Posts

See All

17 Comments


Chris V
Chris V
Jan 30, 2020

Have you tried the new version I put in the repository? It fixed the issue for Josh.

Like

Eric Smith
Eric Smith
Jan 30, 2020

Chris - this looks like the same issue I am experiencing. I'm glad to try and help track this down. Have you done a diffchecker.com comparison of between each of the code pieces in your org and what is in the source repository yet?

Like

Chris V
Chris V
Jan 29, 2020

Josh, do you mind emailing me at chris@professorflow.com with more details so I can try to reproduce this issue?

Like

josh.dayment
Jan 29, 2020

This is pretty awesome but I can't get it to work I use the original in quite a few flows. I copied and pasted the code above directly into the developer console in my sandbox but I am not returning anything in my search in debug the design is populating just no lookup..



Like

Chris V
Chris V
Jan 25, 2020

Okay, I removed the new placeholder. The original component used placeholder differently from how I use placeholders. It uses it to set a pre-search essentially. For this, I prefer to set the output value with the record Id so it is pre-populated with a selection.

Like
bottom of page