We have a certain requirement in CRM 2015 in which we need to restrict backward movement in Business Process Flow for Non-S/S Admin users.
I iterated through Client API’s (including scripting for Upgrade 1) but I didn’t find any API for achieving using any of the exposed method. So, finally I wrote custom code for this by hijacking the backward movement of the Business Process Flow and prompting user that this is the restricted move for Non-S/S admin users.
However, this is an unsupported change and I see this won’t be an issue as long as DOM ids are same (since on a quick look I found DOM Ids are same in 2013, 2015 and 2015 Rollup1 for BPF).
function restrictBPFPreviousMove() {
var originalPreviousStageHandler = $("#stageBackActionContainer").data("events")["click"][0].handler;
$("#stageBackActionContainer").unbind("click");
$("#stageBackActionContainer").click(function (e) {
alert("Restricted Back Move!");
});
}
However, I was wondering if there is any alternative (supported) to this approach?