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

Notifications

Announcements

No record found.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans