I have a related list button in Classic that isn't working in Lightning and we are still transitioning. We created a Lightning Action that calls a Lightning Component and leads to the same controller as the related list button. I was wondering if I can make the related list button work for Classic and Lightning.
In the past I have managed to create a button that opens a report in Classic and Lightning based on what the user is in.
{!IF($User.UIThemeDisplayed="Theme4d", URLFOR('/lightning/r/Report/00O1B000009TgKdUAK/view?fv0=' + Case.AccountId ), URLFOR('/00O1B000009TgKd', null, [pv0=Case.AccountId]) )}
In Lightning we have an action that calls a Lightning Component that does the same stuff as the classic button.
does anyone know if it is possible to call the Lightning Component if in Lightning or just call the class if in Classic?
I have updated the Aura component to have isURLAddressable and tried to update my list button but it is not working.
<aura:component
implements="force:lightningQuickAction,lightning:isUrlAddressable, force:hasRecordId"
extends="c:CAE_OpportunityCustomClone"
>
<aura:handler name="init" value="{!this}" action="{!c.doInit}" />
</aura:component>
Button: {!IF($User.UIThemeDisplayed="Theme4d", URLFOR('/lightning/cmp/c__CAE_CloneToDependantChild?c__id={!Opportunity.Id}&c__Object=Opportunity&c__OpportunityId={!Opportunity.Id}'),
URLFOR('/apex/CloneOpportunity? Id={! Opportunity.Id } &new_url=%2F006%2Fe%3FretURL%3D%252F{!Account.Id} %26accid%3D{!Account.Id}%26opp3%3D{!Account.Name} - &CF00N30000005eGbC={! Opportunity.Name } &CF00N30000005eGbC_lkid={! Opportunity.Id} &opp3= &RecordTypeDevName=Defence_Child_Opportunity_Contracted_Follow_On_Contract &ContractType=Dependent Child') )}