Configure the below Enable Rule for the required ribbon buttons to show Only in Mobile/ Tablets and not in CRM Web.
Use the below function,
function ShowOrHideDeviceButtons() { var showOrHideFlag = false; // Form Factor = 2 - Tablet // Form Factor = 3 - Phone if (Xrm.Page.context.client.getClient() == "Mobile" && (Xrm.Page.context.client.getFormFactor() == 2 || Xrm.Page.context.client.getFormFactor() == 3)) { // Add code that should only run in CRM for phones here showOrHideFlag = true; } return showOrHideFlag; }
Output:
Dynamics 365 for phones App View: Highlighted ribbon buttons can be seen only in Mobile/ Tablet.
CRM Web View: Buttons are not displayed in CRM Web View.
Hope you learned a new thing today :):):)