We intended to open a specific Product form, distinct from the default one, when clicking a view button. Since using a ‘Select Form’ rule was not viable, we opted for the following code solution. When employing the ‘FormManager.showEditDialog’ function, we include the last argument as {“@@FormName”: “Your Form name”}. This approach attempts to open the desired form by searching for the given name.
MobileCRM.UI.EntityList.onCommand("custom_openAllocatedProducts", function (entityList) {
var currentPO = entityList.selectedEntity.id;
MobileCRM.UI.FormManager.showEditDialog("product", currentPO, null, { "@@FormName": "Allocated Products on Quotes" });
}, true);