Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

OData Query

Posted on by 70

Hi!
I use OData Query to retrieve datas in CRM365.
Sample:

oUrl = ""addressserver/.../SystemUserRolesSet$select=RoleId&$filter=SystemUserId eq guid'{guidnumber}'""
$.ajax({
type: "GET",
async: false,
contentType: "application/json; charset=utf-8",
datatype: "json",
url: oUrl.toString(),
beforeSend: function (XMLHttpRequest) {
XMLHttpRequest.setRequestHeader("Accept", "application/json");
},
success: function (data, textStatus, XmlHttpRequest) {
oData = data.d;
},
error: function (XmlHttpRequest, textStatus, errorThrown) {
alert("erro: " + errorThrown);
}
});

...

But OData Query work with HTTP.

someone know how make it work with HTTPS.
Another library, technology.


*This post is locked for comments

  • RE: OData Query

    Thank you for all your help.

    I use webApi (Web API Query Data Sample (Client-side JavaScript)) msdn.microsoft.com/.../mt742431.aspx

  • Suggested answer
    Gee Bee Profile Picture
    Gee Bee 11,397 on at
    RE: OData Query

    Hi

    If you want to use https then set up your CRM for the same. You need to apply SSL to your CRM web application.

    Please refer the following:

    www.qgate.co.uk/.../how-to-update-the-ssl-certificate-for-microsoft-dynamics-crm

  • Verified answer
    ashlega Profile Picture
    ashlega 34,475 on at
    RE: OData Query

    Hi,

     odata works over https or http.. it depends on whether you CRM web-server role is using https or http. Basically, if you are using https to access CRM, then you should be able to use odata over https. If https is not configured.. then you have to use http.

     Other than odata, you can look into webApi:

    msdn.microsoft.com/.../gg334767.aspx

     But it's the same story - https has to be configured for CRM first.

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: OData Query

    Is actually the same I guess.

    Why don't you try to use the WebAPI instead? There is a library to make it handy instead of writing the whole request.

    URL: sdkwebapi.codeplex.com

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,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans