I have created a quick action(InactivateUser), on click of that quick action I want to change the label of that quick action through lightning component/controller.Can anyone please let me know is this possible?
1 Answer
What you are trying to achieve is as far as I can say is not possible unless you heavily customize your components to interact with metadata components. Let's say even if this was possible, I wouldn't have recommended to do it this way.
By doing this, you will necessarily end up changing a metadata component. Consider if there was another page layout using the same quick action, you would have ended up changing the label globally without anyone being aware of the change as why it was there. It could lead to much more problems rather than solving anything.
While I am not completely sure about your use case, but if you need to show the action dynamically, consider using Record Types and Page Layout combination then. So whenever you click the button, change the record type thus changing the page layout. And that, on the new record type/page layout, just don't have the action displayed, instead show the desired action with a different label.
-
Even If i want to change the name for only some duration and then reverting back to original. Will that also not a good solution? Commented Feb 22, 2019 at 4:54
-
@Ruchit612 No. Any change even momentarily is not considered to be a good approach. You should revisit your use case and see other options. Commented Feb 22, 2019 at 12:59
-