22

I'm afraid you can't. I would like to be able to do it to, at least customize the behavior of the "Save" button, but unfortunately it's not possible. As you said, you need either to put the button inside your component with force:lightningQuickAction, or recreate everything in a component with force:lightningQuickActionWithoutHeader. Solution 1 is easier ...


18

There is a catch in case of cases and work orders objects when it comes to quick actions. In the article under Actions on record pages there is note that says Actions on cases and work orders appear in a different way than on other records. On case and work order records, the page-level action menu contains custom buttons and supported standard ...


14

I asked in the Lightning Trailblazers org62 group about this, a few months ago, and the response we got was that SFDC understands this usecase but do not have an estimate for delivery yet. FWIW, we created a custom component with a button that sits on the lightning page, instead of using a quick action. Initially we displayed a spinner inside the quick ...


14

You can try force:refreshView, which reloads all data for the view. So in addition to $A.get("e.force:closeQuickAction").fire(); add $A.get('e.force:refreshView').fire(); in your setCallback method. ({ handleClick : function(component, event, helper) { var saveLeadAction = component.get("c.leadSave"); saveLeadAction.setCallback(this, ...


11

I've eventually found a solution. The following script has to be included: <script type='text/javascript' src='/canvas/sdk/js/publisher.js'></script> Then use this line to close the Quick Action window: Sfdc.canvas.publisher.publish({ name: "publisher.close", payload:{ refresh: "true" }});


8

I found a workaround if you want to continue using the lwc quick action(as I do :)). You can use NavigationMixin and have it Navigate to the record page you're on. this[NavigationMixin.Navigate]({ type: "standard__recordPage", attributes: { recordId: this.recordId, ...


7

Use $A.get("e.force:closeQuickAction").fire();inside your component controller at the necessary place. This line will close the modal box automatically.


7

As the error states: Lightning Web Components quick actions are not supported for this entity (emphasis mine) That means that you can use LWCs as Quick Actions, but not on Work Orders. The documentation also says: NOTE LWC quick actions are currently supported only on record pages. LWCs only recently gained any Quick Action support, and it will likely ...


6

As you've discovered, you can get force:hasRecordId. Unfortunately, any other fields you want, you have to query for. The easiest way to query for them is with force:recordData; this automatically pulls the data from the cache, when available, and includes the record's name: <aura:component implements="force:hasRecordId,force:lightningQuickAction"> &...


6

From the input got from Pranay's answer, I was able to launch flow from quick action. I have created a quick action in Account like: Then I created recordId variable in my flow. Using recordId I added a record lookup to account details. No need to pass account id to flow. recordId is a reserved variable which holds current record id.


5

Try this. After few css trick, I managed to fix it myself. This solution override the dialog box height which you mentioned while creating custom action on an object. I hope this will help someone needed. <aura:component implements="force:lightningQuickActionWithoutHeader,force:hasRecordId" controller="MilindTest"> <style> .cuf-content {...


5

I think no matter what kind of Quick Action you do, native or customized, it will always open a modal window in Lightning. You could create a small VisualForce page or Lightning component to add directly to the Lightning page layout, which simply hosts a button that carries out the desired action. That may be the only way to put a one-click action inside ...


5

The code I used was fine. I found following Known Issue existing for this same issue and it has been Fixed already in the platform now, and the Close behavior is not consistent with this Event firing from any context. https://success.salesforce.com/issues_view?id=a1p3A0000001CcxQAE&title=lightning-component-which-uses-force-closequickaction-is-working-...


5

Can you re-check this please. Because I tried the exact same code in my org and its working fine. Please check the screen shots - Note - Can you check your component version number once. Mine is 40 and it works fine.


5

There is a yet undocumented state property that helps here: this[NavigationMixin.Navigate]({ type: 'standard__objectPage', attributes: { objectApiName: this.type, actionName: 'new' }, state: { nooverride: '1' } });


5

Per today's Summer 21 release webinar, you will need to do two things Add a new import: import { CloseActionScreenEvent } from 'lightning/actions'; Then add a simple method to close it: closeQuickAction() { this.dispatchEvent(new CloseActionScreenEvent()); } You can then call that and it will close the quick action. More details here H/T to ...


5

I had to test this, but it seems there's two different behaviors for the different actionTypes. ScreenAction recordId is undefined in connectedCallback and renderedCallback unless you use it in your html. In that situation, renderedCallback has the value of recordId. If the variable is not in the html template, I haven't seen a way to get it in the js. ...


4

The reason why it is working when invoked in callback code because there is modal listener ready for the event and then modal listener can close the model. But if you write your logic on doInit ( I assume you are registering with init event) then there is no modal which is listening. So modal will not be able to close. If I am not wrong here you want to ...


4

The deploying user did not have Marketing User checked in the user's detail page. Therefore, the user didn't have access to Campaigns and could not deploy the create campaign quick action.


4

Components can only have one controller, so assuming this is a generic utility called all over the place, odds are, no, you won't be able to do this directly. If you look at force:recordData, you'll see that having a "generic" utility component that can interact with a particular service can be a viable design. You'd hook everything up with aura:method, and ...


4

Thanks to Rajesh and Brian for their insight that I've taken on board. My answer here outlines what I plan to do, which is substantially also driven by the large number (around 50) of these buttons that I need to replace. At the server-side a single entry point that dispatches to the existing webservice methods seems a simple way to go: public with sharing ...


4

This is a expected behaviour from salesforce when feed tracking is enabled for cases or work orders, the page-level action menu on those records contains only custom buttons and supported standard buttons. Quick actions appear on the Chatter tab. workaround:- So in order to not see the action in the feed on Case or Work orders object record, you need ...


4

This is a expected behaviour from salesforce when feed tracking is enabled for cases or work orders, the page-level action menu on those records contains only custom buttons and supported standard buttons. Quick actions appear on the Chatter tab. workaround:- So in order to not see the action in the feed on Case or Work orders object record, you ...


4

The force:lightningQuickActionWithoutHeader provides the box with the close button and semi-transparent black background. The slds-modal__container is providing the other semi-transparent black box (the one that goes from top to bottom). The container is not meant to be used in a Quick Action box.


4

NOTE: URL hacks do not work in lightning experience. Flow Type: Flow actions support only flows that include screens. Input Variables Flow actions let you pass the value of the record's ID field into the flow, but that's it. If your flow has a Text input variable called recordId, the action passes the record's ID into that variable at runtime. If not, it ...


4

The typeAttributes for a url field accepts an additional parameter, target, which carries through to the generated <a> tag. It's documented in the Lightning Component Library, but only in passing: TYPE DESCRIPTION SUPPORTED TYPE ATTRIBUTES url Displays a URL using lightning:formattedUrl label, target, tooltip I've ...


4

This is a platform limitation and articulated here. Quoting from the docs below NOTE Actions on user profiles, cases, and work orders can appear in a different way than on other records. Actions on the user profile page come from the Quick Actions in the Salesforce Classic Publisher section of the global publisher layout. Only standard Chatter actions ...


3

Indeed, this is not supported in Lightning. In my organization, I mainly overcame this by including the desired logic in a unified Custom HTML email template, and set it as a default for the Email action. Also, I added the recipient list, email subject, FROM, to, cc and bcc fields as formulas in predefined fields on that same Email action. If you'll share ...


3

Just add the below code in your component so that it doesn't show up the modal when you click on the Quick action button <aura:html tag="style"> .slds-backdrop { background: rgba(43, 40, 38, 0) !important; } .slds-fade-in-open { display:none !important; } </aura:html>


3

According to the documentation, you can invoke Quick Actions both via Apex and REST API. https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_class_quickaction_quickactionrequest.htm https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_sobject_quickactions.htm However, I do not think there is a base ...


Only top voted, non community-wiki answers of a minimum length are eligible