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

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

odata request too long

(0) ShareShare
ReportReport
Posted on by 180

I use REST.js library to fire the RetrieveMultiple-message on a custom entity. A plugin handles the request then.

var result = SDK.REST.retrieveMultipleRecordsSync("rt_command", options, function(error) {

               });

the "options"-string is long. As far as not encoded it is less than 2048 chars and the call works fine.

As soon as encoded

options = encodeURI(options);

it grows and the call fails (fiddler reports 404.15 The request filtering module is configured to deny a request where the query string is too long).

Is it possible to send the POST instead of GET? Wich options do I have?

Thank you

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Vijay Waghmare Profile Picture
    on at
    RE: odata request too long

    yes, you can use SOAP call through javascript,

    please refer below URLs

    msdn.microsoft.com/.../hh771584.aspx

    vikramxrm.blogspot.in/.../retrieve-multiple-records-using.html

    www.mscrmconsultant.com/.../soap-xml-retrievemultiple-using.html

    Thanks,

    VIjay Waghmare

  • c_xyTopa Profile Picture
    180 on at
    RE: odata request too long

    Sorry, I don't get the basics I suppose.

    The odata request (wich is the REST implementation) uses the HTTP GET.

    Can I use the HTTP POST with odata?

  • Vijay Waghmare Profile Picture
    on at
    RE: odata request too long

    URL limit is restricted to 2048 for both REST and SOAP.

    since in SOAP call, generally its key/value pair and these pairs are transferred in the header and not in the URL.

    Thanks,

    Vijay Waghmare

  • c_xyTopa Profile Picture
    180 on at
    RE: odata request too long

    ...Great idea with a dummy entity, didn't thougt of that!

    Did I understand right, that both REST and SOAP service requests are limited to 2048?

  • Community Member Profile Picture
    on at
    RE: odata request too long

    how is the data in the query string formatted? While I don't know if POST is available in this instance, I had a similar problem with a piece of GIS software that  integrated with crm and was dependent on being passed a long URL. As I was sending XML, I wrote a cs file (hosted on the same domain as the crm) that built the xml for me, then pointed the query string toward it... Apologies if that isn't useful.

  • Verified answer
    Vijay Waghmare Profile Picture
    on at
    RE: odata request too long

    Yes, you can make use of SOAP call in MSCRM. URL length limit is 2048 for both REST and SOAP call; however, the POST method is not limited by the size of the URL for submitting name/value pairs. These pairs are transferred in the header and not in the URL.

    Please refer below URL for more details,

    support.microsoft.com/.../208427

    Or, you can create a dummy entity to store the option data in text attribute with maximum length set.

    Create a dummy entity record, just before your retrieve multiple call. On successful creation of dummy entity record it will return you the newly created record’s GUID.

    Pass this GUID of newly created record as option to retrieve multiple call.

    Once underlying plugin hit, read the data from dummy entity by passed GUID. Once you operation is completed delete the dummy entity record in post operation event.

    Hope this help.

    Thanks,

    Vijay Waghmare

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…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#2
Christoph Pock Profile Picture

Christoph Pock 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans