... ... ... ...
The code above shows that we would like to pass a parameter to the controller via actionFunction when the user clicks the button. This will allow it to work in classic mode. However, it will throw an error saying “The page is not supported in Lightning experience” when we try to repeat in the Lightning experience mode.
Note that now the command button will invoke the onclick function first before invoking the doMyAction action.