Hi,
Please note my CRM version: 2015 On-premises update 0.1
Given the version of CRM I have here I only have the Xrm.Page.ui.process methods of set visible and set display state.
I have 2 different case types in CRM and for one of them I want to always hide the BPF and the other always show.
I have successfully used JavaScript and the setVisible method to achieve this for most scenarios.
Unfortunately I have a lot of resolved cases which came over from CRM2011 and as such do not have any reference to the BPF on the form and I get this error when viewing the resolved case record "Unable to get property 'setVisible' of undefined or null reference".
Ideally my JavaScript would say: Does a BPF exists on the form? If Yes, check the type then set visible true or false.
I have tried methods such as Xrm.Page.data.process.getActiveProcess() and Xrm.Page.data.process.getEnabledProcesses() to try and return a null value but I get the same error message as above on load.
A workaround is to re-open then close the cases but this is not very feasible due to volume.
Any suggestions appreciated. Thanks.
*This post is locked for comments