I have created a Flow with modal using Aura Component and Visualforce page. I have a lookup input field on the flow to search for an account. However, the "Show All Results for .." option is not working.

Flow with Modal

When I clicked on it, it shows an error on the browser developer console:

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '$setParams$') at Object.dispatchGlobalEvent (aura_proddebug.js:56715:44) at eval (deprecatedOverlayUtils.js:32:18) at Object.getAura (auraUtils.js:28:9) at eval (deprecatedOverlayUtils.js:31:21) at eval (platformOverlayUtils.js:324:11) at new Promise () at Object.showCustomOverlay (platformOverlayUtils.js:318:14) at eval (deprecatedOverlayUtils.js:30:37)

And an error on the background page:

This page has an error. You might just need to refresh it. [Cannot read properties of undefined (reading '$setParams$')] Failing descriptor: {markup://lightning:deprecatedOverlayUtils}

I am not very familiar with Aura Component and Visualforce page. How do I resolve this?



<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction">
<aura:attribute name="isOpen" type="Boolean" default="false" access="private"/>
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>

<aura:if isTrue="{!v.isOpen}">
    <div style="height: 640px;">
        <section role="dialog" tabindex="-1" class="slds-modal slds-fade-in-open">
            <div class="slds-modal__container" style="z-index:9990;">
                <header class="slds-modal__header slds-modal__header_empty" style="overflow: visible;">
                    <lightning:buttonIcon iconName="utility:close" class="slds-modal__close" onclick="{!c.closeFlowModal}"/>
                <div class="slds-modal__content slds-p-around_medium" style="overflow: visible;">
                    <lightning:icon iconName="standard:opportunity" alternativeText="Opportunity" title="Opportunity" />&nbsp;&nbsp;<strong>Opportunity</strong>
                    <lightning:flow aura:id="flow" onstatuschange="{!c.closeModalOnFinish}" />
        <div class="slds-backdrop slds-backdrop_open"></div>


    doInit : function(component, event, helper) {
        component.set('v.isOpen', true);
        var flow = component.find('flow');
    closeFlowModal : function(component, event, helper) {
        component.set("v.isOpen", false);
    closeModalOnFinish : function(component, event, helper) {
        if(event.getParam('status') === "FINISHED") {
            component.set("v.isOpen", false);


<aura:application extends="ltng:outApp">
    <aura:dependency resource="c:*" type="COMPONENT"/>


<apex:page standardController="Opportunity" recordSetVar="s" tabStyle="Opportunity">
    <apex:includeLightning />
    <div id="lightning" />
    $Lightning.use("c:Flow", function() {
        ("c:MyFlow","","lightning",function(cmp) {

UPDATE I have tried to Embed the Flow inside a VF Page and show as List Button:

<apex:page standardController="Opportunity" recordSetVar="s" tabStyle="Opportunity">
    <flow:interview name="Opportunity_Rapid_Creation"/>

but I got this error:

We can’t display component 'flowruntime:lookup', because it isn't supported in Classic runtime. Ask your Salesforce admin to distribute this flow in Lightning runtime instead.

  • 1
    I have faced the same issue and couldn't find a solution. Even if you just follow the official documentation and put a flow with a lookup field inside it, you can reproduce this issue. Try to log a case with Salesforce support.
    – Saroj Bera
    Commented Feb 11, 2022 at 18:02

3 Answers 3


The problem is that "lightning:app" does not support "lightning:overlayLibrary" and hence you get the error. You can see more info on below links:--


Lightning:overLayLibrary issue Uncaught (in promise) TypeError: Cannot read property 'la' of undefined

  • Any workaround for this?
    – user2018
    Commented Feb 7, 2022 at 14:42
  • Unfortunately, since its all standard functionality we cannot modify it. You need to create a custom solution. Also, not sure why you need aura for this. You can simply drag a flow component on lightning record page and use directly.
    – user111032
    Commented Feb 7, 2022 at 14:46
  • We need it on the object list view page
    – user2018
    Commented Feb 7, 2022 at 14:50
  • Create a custom list view button that launches your flow on click and add it to the list view page.
    – user111032
    Commented Feb 7, 2022 at 15:02
  • we have it. But now we want to show it in a Modal
    – user2018
    Commented Feb 7, 2022 at 15:41

Are you required to use that Standard Lookup component in the flow? If you are allowed to use custom lookup component, you can check this component, install it, and change your standard lookup component to this one : https://unofficialsf.com/lookup/#install

enter image description here

As you can see there, instead of using that "Show All Results for..." functionality, this component actually allows you to search for the result without opening another modal for all results

hope that helps


@user2018 Can you try this -https://jenwlee.com/2019/11/13/look-it-up-in-a-flow-screen/

  • Try getting the data by using lookup in screen component

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .