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
Vivek Ponugoti 20Vivek Ponugoti 20 

how to check lightning component is opened from quick action dialog box

I have a lightning component were it used at two places once at Quick action button in popup and other in record detail page layout. Know i would need to recognise when the component is opened in popup through the Quick action button, so that i need to perform required action within the component.
Any help is appreciated.
Ashif KhanAshif Khan
Hi Vivek,

There is a workaround you can implement.
Create Two component 

QuickActionComp.cmp
 
<aura:component implements="force:lightningQuickAction, force:hasRecordId">
   <aura:attribute name="isQuickAction" type="Boolean" default='true' />

   {!v.isQuickAction}

</aura:component>

RecordPageComp.cmp   

Add same quickAction component in recordPageComp
 
<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId" access="global" >
    <c:QuickActionComp recordId='{!v.recordId}' isQuickAction='false'/>
</aura:component>

isQuickAction  attribute you can use as a flag to differentiate 

I hope this will help you let me know if it works.
Regards
Ashif