1 件の回答
You could make use of <apex:variable var="classic" value="{! $User.UIThemeDisplayed == 'Theme2' || $User.UIThemeDisplayed == 'Theme3' }"/> to check whether UI is Classic or lightning and use Rendered attribute in <apex:commandButton rendered = "{! !classic}"/>.This helps to display the command button only in lightning view.