4

We are using Lightning out with Visualforce page to allow users to override standard button of specific object.

Now we are planning to use a Lightning component to be used as a override option for standard buttons directly, which can be done from below highlighted setting.

enter image description here

Note: One issue with components is if its directly used to override as Lightning Component Bundle, it does not works in Classic. But we still want users to have an ability to do so.

Solution: use lightning:actionOverride in implements attribute of the component as mentioned in this question.

Problem: The component is still available as an option in other objects.


Try 1: Option suggested by Brian in this answer, its still available for other objects, basic markup is as follows:

Component:

<aura:component description="TestOverride" 
    implements="lightning:actionOverride">
    <p>Basic component</p>
</aura:component>

Design:

<design:component>
    <sfdc:objects>
        <sfdc:object>Contact</sfdc:object>
    </sfdc:objects>
</design:component>

Please share some thoughts if this seems possible.

4

From the documentation- Creating a Lightning Component for Use as an Action Override:

The Lightning Component Bundle menu includes every component that implements the lightning:actionOverride interface.

A component that implements lightning:actionOverride can’t restrict an admin to overriding only certain actions, or only for certain objects. We recommend that your organization adopt processes and component naming conventions to ensure that components are used to override only the intended actions on intended objects. Even so, it’s your responsibility as the component developer to ensure that components that implement the lightning:actionOverride interface gracefully respond to being used with any action on any object.

Also there is a known issue reported: Filter Lightning Components when assigning Action Overrides

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.