Sunday, September 24, 2023
HomeUncategorizedCreate Filtered Lookup with Selection Lookup

Create Filtered Lookup with Selection Lookup


Final Up to date on December 11, 2022 by Rakesh Gupta

Huge Thought or Enduring Query:

  • How do you utilize the brand new selection lookup (beta) part to show filtered data? 

This weblog is a sequel to my earlier weblog – Select Multiple Records in the Lookup ComponentWithin the earlier weblog, I mentioned methods to configure the Lookup move display part in order that customers can search and choose a couple of document.

This text goes a step forward and explains methods to configure the brand new selection lookup (beta) move display part to show filtered data.


After studying this weblog, you’ll have the ability to:  

  • Create a Display Circulation and add a Display aspect to it.
  • Add a selection lookup (beta) part to your display aspect
  • Show filtered data utilizing the gathering selection set
  • Show filtered data utilizing the document selection set
  • And far more

Edward Backhouse is working as a System Administrator at Gurukul on Cloud (GoC). He has acquired the next requirement from the administration:

  1. Add a display move on the house web page that permits customers to pick out a number of alternatives
  2. Ultimately, replace the chosen open alternative to closed misplaced.

Automation Champion Method (I-do):

With the Spring’23 launch, it’s now attainable so as to add a filter lookup part utilizing a model new selection lookup (beta) display move part. Utilizing a filtered Assortment Selection Set or Report Selection Set, you possibly can create a Lookup that shows open alternatives, unqualified leads, or contacts from a beforehand chosen account within the display move.  

Earlier than we proceed additional, allow us to perceive the traits of the Selection Lookup part.

Attribute Description
API Title An API title can embrace underscores and alphanumeric characters with out areas. It should start with a letter and may’t finish with an underscore. It can also’t have two consecutive underscores.
Label Person-friendly textual content that shows to the left of the part.
Require Requires customers to enter a worth earlier than they will transfer to the following display.
Placeholder Textual content Textual content that seems within the subject when it’s empty. Use placeholder textual content to present customers a touch about what to enter within the subject.
Selection Add a minimum of one selection, document selection set, or assortment selection set to this part. Accessible solely once you add a selection part to the display part.
Default Worth Pre-selected selection for the part. If the related display isn’t executed or the situations for part visibility aren’t met, the saved worth of the part is null.

Use the chart supplied by Salesforce to grasp when to make use of which lookup part.

Earlier than discussing the answer, let me present you a diagram of a Course of Circulation at a excessive stage. Please spend a couple of minutes going via the next Circulation diagram and perceive it.

Let’s start constructing this automation course of.

Guided Follow (We-do):

There are Four steps to resolve Edward’s enterprise requirement utilizing Display Circulation. We should: 

  1. Outline move properties for display move
  2. Add a Display aspect
    1. Create a Report Selection Set to generate a filtered checklist of open alternatives.
    2. Add a Selection Lookup (Beta) Part that permits customers to pick out an open alternative.
  3. Add an Replace Information aspect to replace the chance Stage to Closed Misplaced.
  4. Add a display move to the lightning residence web page

Step 1: Outline Circulation Properties

  1. Click on Setup.
  2. Within the Fast Discover field, kind Flows.
  3. Choose Flows, then click on on the New Circulation.
  4. Choose the Display Circulation possibility and click on on Create and configure the move.
  5. It should open the move designer for you.

Step 2: Add a Display Factor 

  1. On Circulation Designer, click on on the +icon and choose the Display aspect.
  2. Enter the next info:
    1. Enter Label the API Title will auto-populate.
  3. Click on Finished

Step 2.1: Add a Report Selection Set to Generate a Filtered Checklist of Open Alternatives

  1. Underneath Toolbox, choose Supervisorthen click on New Useful resource to create a document selection set to generate a filtered checklist of open alternatives. 
  2. Enter the next info: 
    1. Useful resource Kind: Report Selection Set
    2. API Title: recChoice_OpenOpportunities
    3. Object: Alternative
    1. Filter Alternative Information
      1. Row 1:
        1. Discipline: IsClosed
        2. Operator: Equals 
        3. Worth: {!$GlobalConstant.False}
    2. Configure Every Selection
      1. Selection Label (Choose a subject that generate label for every selections): Title
      2. Knowledge Kind (Knowledge kind of the selection’s worth): Textual content
      3. Selection Worth (Choose a subject whose worth you wish to retailer when the person selects this selection at run time): Id
  3. Click on Finished.

Step 2.2: Add a Selection Lookup (Beta) Part to Show Filtered Checklist utilizing Report Selection Set

  1. Underneath Enter part on Display Factor. Drag and drop Selection Lookup (Beta) onto the display. 
  2. Enter the next info:
    1. Enter Label and API Title.
    2. Require: Chosen
    3. Selection: {!recChoice_OpenOpportunities}
  3. Click on Finished.

Step 3: Add Motion – Replace Information

The subsequent step is to replace the chosen alternative Stage to Closed Misplaced. We’ll use the Replace Information aspect. 

  1. On Circulation Designer, click on on the +icon and choose the Replace Information aspect.
  2. Enter a reputation within the Label subject; the API Title will auto-populate.
  3. For Find out how to Discover Information to Replace and Set Their Values choose Specify situations to establish data, and set fields individually
  4. Object: Alternative
  5. Choose All Situations Are Met (AND)
  6. Set Filter Situations
    1. Row 1:
      1. Discipline: Id
      2. Operator: Equals
      3. Worth: {!Open_Opportunity.selectedChoiceValues}
  7. Set Discipline Values for the Alternative Information
    1. Row 1:
      1. Discipline: StageName
      2. Worth: Closed Misplaced
  8. Click on Finished.

Ultimately, Edward’s Circulation will appear like the next screenshot:

As soon as all the things seems good, carry out the steps beneath:

  1. Click on Save.
  2. Enter the Circulation Label the API Title will auto-populate.
  3. Click on Present Superior.
  4. API Model for Working the Circulation: 57
  5. Interview Label: Selection Lookup Instance {!$Circulation.CurrentDateTime}
  6. Click on Save.

Nearly there! As soon as all the things seems good, click on the Activate button.

Step 4: Add a Display Circulation to the Lightning Residence Web page

The subsequent step is to distribute a move to Lightning Expertise or Salesforce app customers by embedding it on a Lightning residence web page.

Proof of Idea

Formative Evaluation:

I wish to hear from you!

What’s one factor you discovered from this publish? How do you envision making use of this new data in the actual world? Be happy to share within the feedback beneath.


Source link



Please enter your comment!
Please enter your name here

- Advertisment -

Most Popular

Recent Comments