ADX/CRM PORTAL: Use of OData Query in ADXStudio

Adxstudio Portal is now one of the most used Web Portal integrated with Dynamic CRM. One of the most common requirement on Portal is to auto populate data in entity forms fields based on lookup value.


For example lets consider that when user select customer in Customer lookup field, it should auto populate selected customer entity data on case entity form fields such as customer email, mobile phone, company name etc. 

Introduction to OData

OData stands for Open Data Protocol. Dynamic CRM mainly uses Windows Communication Foundation (WCF) data services framework to provide OData Endpoint which is nothing but a REST based data service. 

The sample endpoints are as follows:
https://{OrganizationRootUrl} /XRMServices/2011/OrganizationData.svc

How to use OData query in Adxstudio Portal?

  1. Create Entity List in CRM 

  1. Test OData

Check your portal url  on browser in below mentioned format.
<Portal Url>/_odata   -  This will give you all Entity list in which you have enabled OData Feeds.

Check your portal url  on browser in below mentioned format.

<Portal Url>/_odata/<Entity Set Name>   -  This will give you the result of OData on browser.

How to use OData in JavaScript (on Entity Form/Web Form/Entity List/Web Page/)

// Start Case Retrieval code

var GetResolvedCases = "~/_odata/cases?$filter=statuscode/Value eq 1";


var caseGuid = 'A237C638-F47B-E611-80F2-5065F38BF2F1';

var retrievebyGUID = "~/_odata/incidents?$filter=incidentid%20eq%20(guid%27" + caseGuid + "%27)";

    type: "GET",
    url: GetResolvedCases,
    dataType: 'json'
}).done(function (json) {

    var CaseColl = json.value;

    // Get Case ticket number
    if (CaseColl[0].ticketnumber)
        CaseId = CaseColl[0].ticketnumber;


// Case Retrieval code End

Using above code you can get Case ticket number, if you are familiar with Dynamic CRM OData query then you can make query as per your requirement, or you can refer below link to know more about OData query syntax and uses.

Posted: Aug 15, 2018,
Categories: Microsoft Portals,
Comments: 0,
Author: Urish Arora
Tags: portal
Rate this article:

Urish AroraUrish Arora

Other posts by Urish Arora

, Contact author

Please login or register to post comments.




Subscribe to our blog

«November 2019»

  • Featured Posts
  • Recent Posts
  • Recent Comments
Dynamics365Authority is a community platform for Professionals and Students to contribute or share their knowledge and skills on Microsoft Dynamics 365 Technologies. Our primary goal is to invite professionals on Dynamics 365 technology across the world to contribute & share their knowledge and skills through their blogs so that we can help other developers.
Stay updated with Dynamics 365 technology. Improve skills and knowledge from our blogs, articles and code snippets. Learn it. Follow professionals and learn from them.
Unified Service Desk Book(Online Edition) 


Stay connected with us on our social media channels for latest articles, blogs posts etc.  We will keep updating regularly on our social media platform and web platform.


Follow us on Facebook



View all our tweets



Join us now



View our blogs



Latest Blog

Posted: Jun 20, 2019

Overview - Appendix (Unified Service Desk)

This blog is about Appendix

Read more
Posted: Jun 20, 2019

Overview - Troubleshoot and Debug (Unified Service Desk)

This blog is about Troubleshoot and Debug in Unified Service Desk

Read more
Posted: Jun 20, 2019

Overview - Performance (Unified Service Desk)

This blog is about the Performance in Unified Service Desk

Read more


Dynamics 365 - Search the library for "Dynamics 365"

  What's New in Dynamics 365

  Dynamics 365 Documentation


  Sign-up for 30 days trial



Recent comments


Nice blog. Very helpful to get all references to white papers at one place.

Previous Next

About Us

Here comes the Dynamics 365 Authority - Great technical blog posts are hidden gems. They are hard to find simply because not enough of us write them in the first place. Yet technical blogging is one of the best things we can do not only for ourselves, but also as members of the wider community of developers.

Dynamics 365 Authority leverages this platform to help developers and users to move from traditional paper-based process to modern digital business process. helps your business grow, evolve and transform. is your Digital Transformation Partner

Recent Posts

Overview - Appendix (Unified Service Desk)

This blog is about Appendix
  • 238
  • Article rating: 5.0

Overview - Troubleshoot and Debug (Unified Service Desk)

This blog is about Troubleshoot and Debug in Unified Service Desk
  • 359
  • Article rating: 5.0

Get in touch

Follow Us


Tag cloud: with Urish Arora;; Sales; Leading community site on MS Dynamics 365; Dynamics 365 Authority; Service;Top CRM Blogs; Urish Arora - Australia's leading expert on Digital Transformation;  Digital Transformation; Field Service;Top Articles on MS Dynamics CRM Relationship Insights; Office 365 Security Compliance; Project Service; Microsoft Dynamics 365 for Sales; Relevance Search; Goal Metrics; Activities and Case; Sales Literature;Knowledge Management;

Terms Of UsePrivacy StatementCopyright 2019 by Dynamics365Authority
Back To Top