Hello everyone,
I am facing an error on Unified Interface which I cannot reproduce on the classic UI on the browser. I created a custom Ribbon button which invokes a custom action, and I use that custom action to trigger a plugin. I am making use of the new Xrm WebAPI.
On the plugin I do populate a string output parameter in case any error message needs to be returned.
It works fine on classic UI but on Unified Interface, a pop-up appears saying "Outdated Business Process Flow Definition" This action cannot be completed because business process flow definition is out of sync with the process action.
Debugging on the browser, I realized that Xrm.InvokeProcessAction returns ErrorCallBack with
error.message = An error has occurred. Try this action again. If the problem continues, check the Microsoft Dynamics 365 Community for solutions or contact your organization's Microsoft Dynamics 365 Administrator. Finally, you can contact Microsoft Support.
error.errorCode = 2147746581 (HEX 80040315) This action is not supported.
Below, I show the code I am using for it.
I hope anyone can give me any insight to realize what is wrong on Unified Interface. Thanks in advance!
Xrm.Utility.showProgressIndicator("***********");
Xrm.Utility.invokeProcessAction(actionName, actionParameters)
.then(function (result) {
debugger;
var message = result.$Y_0.exceptionMessage;
if(message && message != "") {
formContext.ui.clearFormNotification("errorNotificationId");
Xrm.Utility.closeProgressIndicator();
formContext.ui.setFormNotification(message, "ERROR", "errorNotificationId");
}
else{
formContext.ui.clearFormNotification("errorNotificationId");
Xrm.Utility.closeProgressIndicator();
formContext.ui.setFormNotification("******.", "INFO", "errorNotificationId");
var entityFormOptions = {};
entityFormOptions["entityName"] = oppEntityName;
entityFormOptions["entityId"] = oppId;
setTimeout(function () {
Xrm.Navigation.openForm(entityFormOptions).then(
function (success) {
console.log(success);
},
function (error) {
console.log(error);
});
}, 3000);
}
},
function (error) {
debugger;
var message = error.message;
});