web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Unified Interface - Custom Button Xrm.Utility.invokeProcessAction error

(0) ShareShare
ReportReport
Posted on by 152

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;
});

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    I am also facing the same issue, any solution??

  • Jorge Gomez Profile Picture
    152 on at

    Hello Mudassar,

    I noticed that it is also possible to make use of the function Xrm.WebApi.online.Execute to invoke custom actions and it does not face some of the errors that I face using invokeProcessAction, take a look at it and try to use it :)

    docs.microsoft.com/.../execute

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans