Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Dynamics 365 returns "Request message has unresolved parameters" when calling an action

Posted on by 401

Hello,

I m getting the following error while calling an action in Dynamics 365 9.0 version

Request message has unresolved parameters

0572.123.PNG

Here is the code.

var parameters = {
"entityRecordId" : "4232901b-2fc5-e711-a898-0022480173bb",
"entityLogicalName" : "opportunity"
};

var req = new XMLHttpRequest();
req.open("POST", "https://org.crm.dynamics.com/.../Microsoft.Dynamics.CRM.new_OpportunityUpdate", true);
req.setRequestHeader("OData-MaxVersion", "4.0");
req.setRequestHeader("OData-Version", "4.0");
req.setRequestHeader("Accept", "application/json");
req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
req.onreadystatechange = function () {
if (this.readyState === 4) {
req.onreadystatechange = null;
if (this.status === 204) {
} else {
var errorText = this.responseText;
}
}
};
req.send(JSON.stringify(parameters));

*This post is locked for comments

  • luoyong Profile Picture
    luoyong on at
    RE: Dynamics 365 returns "Request message has unresolved parameters" when calling an action

    Yes, you can say that again.

    We've encountered such problems sometimes.

  • LaszloPenzes Profile Picture
    LaszloPenzes on at
    RE: Dynamics 365 returns "Request message has unresolved parameters" when calling an action

    Hi,

    I have the same problem. Making changes to a custom action usually breaks it by causing two kinds of issues:

    • The action temporarily responds with 204 No Content instead of the JSON with output parameters. It is probably some caching issue since after waiting for a few hours it works properly. Quite embarrassing when the project deadline is getting closer.
    • Execution fails with the message above, so Request message has unresolved parameters

    Based on the call stack (CrmODataRoutingConvention.SelectAction is the topmost method call) the system can't pick the action to execute. I get the same message if I just type any random action name.

    I'm testing my actions using RESTED Firefox extension, so the problem is for sure not caused by improper JS or wrong action name. Today I made an action, tested, worked ok. Changed it to be a template, created another action based on it and made a minor change (the value of a param of a step) => Request message has unresolved parameters.

    I've been facing the same error many times when I'm deploying custom actions to production environment. Works fine in dev env but fails in prod. Deleting and recreating the exact same action in production usually solves the problem.

    I have to say that custom action could be a very powerful feature if it wasn't so buggy...

    BR,
    Laszlo

  • Suggested answer
    Shahbaaz Ansari Profile Picture
    Shahbaaz Ansari 6,203 on at
    RE: Dynamics 365 returns "Request message has unresolved parameters" when calling an action

    Topic is the input parameter which i have define in my action, you can change the name accordingly

  • Suggested answer
    Shahbaaz Ansari Profile Picture
    Shahbaaz Ansari 6,203 on at
    RE: Dynamics 365 returns "Request message has unresolved parameters" when calling an action

    Hi Nitin,

    You can use below code,

    function CallAction()

    {

    debugger;

    var leadids = Xrm.Page.data.entity.getId();

    leadids = leadids.replace(/[{}]/g, "");

    var requestData ={

    "Topic" : {"leadid" : leadids, "@data.type":"Microsoft.Dynamics.CRM.lead"}

    };

    var requestMethod = 'POST';

    var actionnew = "leadid("+leadids+")/Microsoft.Dynamics.CRM.str_globalactionnew";

    var req = new XMLHttpRequest();

    req.open(requestMethod, Xrm.Page.context.getClientUrl() + '/api/data/v9.0/' + actionnew, true);

    req.setRequestHeader("Accept", "application/json");

    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");

    req.setRequestHeader("OData-MaxVersion", "4.0");

    req.setRequestHeader("OData-Version", "4.0");

    req.onreadystatechange = function () {

    debugger;

       if (this.readyState == 4) {

           req.onreadystatechange = null;

           if (this.status == 200) {

               alert("Action called successfully");

           } else {

               var error = JSON.parse(this.response).error;

               alert(error.message);

           }

       }

    };

    req.send(JSON.stringify(requestData));

    }

    If you find it helpful, Please Mark as Verified.

    Best Regards,

    Shahbaaz

  • Michel van den Brink Profile Picture
    Michel van den Brink 4,697 on at
    RE: Dynamics 365 returns "Request message has unresolved parameters" when calling an action

    Hello,

    It looks like you are using a custom defined Action. 

    Can you please post the definition of the Action?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans