SData Query Language - Examples Available for Download

1 minute read time.

The SData 1.1 Standard provides a comprehensive query language that can filter and restrict data in any way that is needed. Sage CRM uses SData feeds within its own Interactive Dashboard gadgets and can consume feeds from external Sage applications. In turn those External Applications can also access read only SData feeds that expose data from Sage CRM tables and views.

I have written a series of articles about using SData for development in Sage CRM.

The SData query language provides for the filtering of data using a where query parameter.

The SData conditions are used within the Sage CRM client side API as part of the Ajax capabilities

I have discussed the easy to use Ajax API option in Sage CRMin a pair of articles.

The online documentation can be used to understand how to build the query conditions passed within the SData URLs, but it is typically much easier to understand what can be done by viewing examples.

The new file available for developers contains Sage CRM specific examples of the use of the SData query language conditions.

e.g.

  • http://localhost/sdata/crmj/sagecrm/-/person?where=concat(pers_firstname, pers_lastname) eq 'William Agnew'
  • http://localhost/sdata/crmj/sagecrm/-/company?where=comp_updateddate gt @2014-03-14@
  • http://localhost/sdata/crmj/sagecrm/-/company?startIndex=1 &count=10 &where=comp_name like 'A%' or comp_name like 'C%'
  • http://localhost/sdata/crmj/sagecrm/-/quoteitems?where=quit_productid gt 3 and quit_productid le 10

Note: The examples in the file assume that the instance of Sage CRM being used is called 'CRM' and is being referenced locally.

Members of the developer program can download the file from the folder "General Development Resources (All Versions)".