function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
rtvkgndertvkgnde 

Lightning Quick action override-

Please Help!!

I tried creating a new custom component by implementing the required interfaces. But, when am trying to do an action override, Am not able to refer the lightning component that I created.

Am, I missing anything here?? Please suggest???
Best Answer chosen by rtvkgnde
Maharajan CMaharajan C
Hi Ruthwik,

To display a lighting component as a Quick action to an object, It must be implemented with force:lightningQuickAction OR force:lightningQuickActionWithoutHeader.

Can you please Let me know if it helps or not!!!

If it helps don't forget to mark this as a best answer!!!


Thanks,
Raj C

All Answers

Maharajan CMaharajan C
Hi Ruthwik,

To display a lighting component as a Quick action to an object, It must be implemented with force:lightningQuickAction OR force:lightningQuickActionWithoutHeader.

Can you please Let me know if it helps or not!!!

If it helps don't forget to mark this as a best answer!!!


Thanks,
Raj C
This was selected as the best answer
Raj VakatiRaj Vakati
TO override the standard action you need to implemenet  lightning:actionOverride along with force:lightningQuickAction OR force:lightningQuickActionWithoutHeader.


Add the lightning:actionOverride interface to a Lightning component to enable the component to be used to override a standard action on an object. You can override the View, New, Edit, and Tab standard actions on most standard and all custom components. Overriding standard actions allows you to customize your org using Lightning components, including completely customizing the way you view, create, and edit records.

Sample component 
 
<aura:component 
    implements="lightning:actionOverride,force:hasRecordId,force:hasSObjectName">
    
    <article class="slds-card">
      <div class="slds-card__header slds-grid">
        <header class="slds-media slds-media_center slds-has-flexi-truncate">
          <div class="slds-media__body">
            <h2><span class="slds-text-heading_small">Expense Details</span></h2>
          </div>
        </header>
        <div class="slds-no-flex">
            <lightning:button label="Edit" onclick="{!c.handleEdit}"/>
        </div>
      </div>
      <div class="slds-card__body">(expense details go here)</div>
    </article>
</aura:component>

After creating component 
Go to the object management settings for the object with the action you plan to override.
Select Buttons, Links, and Actions.
Select Edit for the action you want to override.
Select Lightning component for the area you want to set the override.
From the drop-down menu, select the name of the Lightning component to use as the action override.
Select Save.