1

When implementing a lightning quick action creating an aura component that implements force:lightningQuickAction, it comes by default with a "Cancel" Button, which I would like to rename as "OK" or Done without implementing force:lightningQuickActionWithoutHeader?

1
  • 1
    Are you talking about force:lightningQuickAction? Could you elaborate?
    – arut
    Dec 25, 2020 at 7:55

1 Answer 1

2

I would recommend to build the quick action using force:lightningQuickActionWithoutHeader.

If you want to stick to the force:lightningQuickAction you can try to add the following code as pointed out in this idea: https://trailblazer.salesforce.com/ideaView?id=0873A0000003Sq6QAE:

 ({
afterRender: function (component, helper) {

    this.superAfterRender();
    var elCompFooter = document.getElementsByClassName("modal-footer");
        if (elCompFooter.length == 1) {
            var elCancelButton = elCompFooter[0].getElementsByClassName("cuf-publisherCancelButton uiButton");

            if (elCancelButton.length == 1 && !elCancelButton[0].hasOwnProperty('onclick')) {
                elCancelButton[0].getElementsByTagName("span")[0].textContent = $A.get("$Label.c.BP_Close_Window");
            }
        }
    }
})
1
  • thanks, how do you wire this? do you need to place in the renderer.js?
    – Edmondo
    Dec 28, 2020 at 14:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .