Autolaunch/Navigate to Quick Actions(URL Hack) in Lightning

I gotta tell ya! I was pretty darn impressed with myself after finding this!

So what are we addressing here?

Simply put, the idea here is to auto fire(or navigate to) a quick action. There can be different kinds of use cases around this.

The one I recently came across was a customer wanting to auto fire a quick action as soon as a particular flow finishes.

My initial thought was to use Publisher API for this which involved writing code(lightning components). As expected, it worked. BUT, what I didn’t expect was how awfully slow it was. The publisher API took almost 4-5 seconds on an average to fire the action.

Then the customer came in saying they do not want to show the action on the page layout. And, for Publisher API to work, the quick action must be added to the page layout.

Yeah, that’s life!
But somehow, I managed to pull it through.

To resolve this, I noticed the URL pattern when a quick action fires, and it looked something like this:

<domain>.salesforce.com/lightning/action/quick/ObjectApiName.QuickActionApiName?recordId=0036F00003euXjdQAE&backgroundContext...

And voila!

All I had to do was create a super simple component which navigated from the flow to the Quick Action URL. And guess what, it was “lightning” fast and you can fire the action even if it’s not on the layout.

Isn’t that cool! Try it out and let me know what you think. Tell me where do you think you’d want to implement this!

I’ll catch you in the next one! ✌
Thank you for being an awesome reader! Subscribe to this blog for receiving all the latest updates straight to your inbox. 🙂

32 thoughts on “Autolaunch/Navigate to Quick Actions(URL Hack) in Lightning

  1. Pingback: From Narender Singh: Launch a Quick Action at the End of a Flow – UnofficialSF

      • Thanks! I am redirecting to the Duplicate Record Set page at the end of the flow, but I don’t want my users to need to click the Compare and Merge button. I was hoping there was a way to get the Compare and Merge screen to pop up automatically.

        Like

      • Umm, there might be a possibility.
        The solution, however, is a bit hacky and involves writing some code(creating a lightning component), and also if something changes on the Salesforce side , it might break and the solution may need a repair.

        So I’m not sure if it’s worth it.

        Like

  2. Pingback: Say Hi to the NEW WAY of launching Flow via URL |  forcePanda

  3. Cleaver bro. Does this work in salesforce mobile app as well? what should be url format for mobile approach and code snippet please.

    Like

  4. Hi Narendra, I want to open New Opportunity page after i have done something. For me below url is not working. Do you know where i can find the appropriate quickactionName ?
    /lightning/action/quick/Opportunity.NewOpportunity?recordtypeId=012200000005QsjAAE

    Like

      • Thanks for your reply. Actually my New button is overridden. If i use something like below : /lightning/o/Opportunity/new?defaultFieldValues={!Opportunity.RecordTypeId}=012200000005QsjAAE
        It navigates to overridden page. I am looking to open standard Opportunity creation page. I though quick action may help here.

        Like

      • I see. Quick action can definitely help. But you will have to first create a quick action on the object from which you’re attempting to create the opportunity.

        There “might” be a standard action already. If not, then simply create a new one.

        Like

  5. Hi i figured out that the solution is working perfectly but I’m in a bit different use case.
    I need to launch a screen flow quick action from a record page which contains an LWC that gathers some information (needed in the screen flow)

    I tried to call the quick action with the same method but even if I write down:
    “domain/quickAction&flowInput=” + encodeURIComponent(JSON.stringify((this.data)))

    the flowInput variable is not correctly populated in the screen flow and it does not work

    Like

    • You cannot pass parameters to flow via this method I’m afraid. You can only pass record ID using this method. If you want to send the data, then you should invoke the flow from the component itself.

      Note: LWC can’t call flow if I remember correctly, so you’d need an aura wrapper to call the flow.

      Like

  6. I would like to launch a Quick Action to create a record from a hyperlink formula field instead of a button on the parent record so I could launch it from a List View or Related List. It seems like such a basic thing to do, but I can’t seem to find anything on this. Is it possible?

    Like

      • Hi, I know this is quite an old thread but I’m looking for the same solution. I’d like to launch a quick action from a Dashboard with a formula hyperlink which is sat on my homepage. Please could you advise?

        Thanks in advance!

        Like

  7. I want to launch the Quick Action from a button using the HTML Editor component in an Experience Cloud stie. I have a custom Notes related object to the Opportunity object. I have successfully created the Quick Action to create the Note on the Opportunity but I want to place my button somewhere else on the page so I was hoping to use the URL for the Quick Action in the HTML Editor component which be used as a button. Is this possible and if so what would the URL to launch the Quick Action be? Thanks

    Like

  8. Hello! I found that the solution works but I was wondering if while calling the quick action by the URL it can stay in the same page. I am using a Screen Flow and then I want to call the quick action but not leaving the page that the user is in making it smoother and a little faster. Can you tell if that is possible?

    Like

Leave a reply to Ariel Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.