0

I would like to launch a Flow instead of the standard "NewCase" button to create a Case. I have followed some instructions to create a Lightning Aura Component to launch the Flow in a modal, and I have selected the component to be used as the override, but when I click the "New" button, the regular Salesforce Lightning Record Page opens.

The ONLY thing I can think of is that because I have dynamic forms enabled, it is refusing to use the override the New button. However I tried unassigning my lightning page entirely from everything, and it still doesn't work - it just defaults to using the page layout.

Here's my component:

<aura:component implements="flexipage:availableForAllPageTypes,force:hasRecordId,lightning:actionOverride,flexipage:availableForRecordHome">
    <lightning:overlayLibrary aura:id="overlayLib"/>
    <lightning:button label="Create Case" onclick="{!c.launchFlow}" />
</aura:component>

Controller:

({
    launchFlow : function(component, event, helper) {
        var flowName = "Create_Case";
        var flow = component.find("createCaseFlow");

        var overlayLib = component.find('overlayLib');
        overlayLib.showCustomModal({
            header: "Create Case",
            body: flow,
            showCloseButton: true,
            cssClass: "my-modal",
            closeCallback: function() {
                // Handle modal close event if necessary
            }
        }).then(function(overlay) {
            // Code to handle overlay promise if necessary
        });

        flow.startFlow(flowName);
    },

})

Override Settings:

enter image description here

1 Answer 1

1

@JustinF

From your screenshot you've only overridden the Mobile experience. You need to also configure the Lightning Experience Override to also override the standard behaviour when not using a mobile device.

1
  • Wow that was silly of me. I could have sworn I had both enabled. Thanks!
    – JustinF
    Mar 15, 2023 at 9:43

You must log in to answer this question.

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