Skip to content
Community Hub
  • User
  • Site
  • Search
  • User

x Want to participate? Join the group to interact
Sage CRM
  • Sage Global Solutions

Sage CRM

Welcome to the Sage CRM Support Group on Community Hub! Available 24/7, the forums are a great place to ask and answer product questions, as well as share tips and tricks with Sage peers, partners, and pros.
General Development Resources SData Query Examples
  • Forums
  • Blogs
  • Videos
  • Members
  • Resources
  • More
  • Cancel
  • Ask a question
  • -General Development Resources
    • Client Side API - Drop in demo code and Readme
    • Clip Library for TextPad
    • Clone Person and Switch Company
    • PanoplyTech 2021 database
    • Sample Theme Override - 2023 R1
    • Sample Theme Override File - 2021 R2
    • SData Query Examples
    • Self Service Starter Files
    • SOAP Web Services Example: Key Explorer
    • SOAP Web Services Test Harness
    • Web to Lead example files

SData Query Examples

Download file: SData Query Examples 

The SData 1.1 Standard provides a comprehensive query language. Sage CRM allows the use of SData within SData gadgets where feeds from external Sage applications can be consumed. It also provides read only SData feeds that allows data from Sage CRM tables and views to be accessed.

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

The Anatomy of an SData URL is documented here:

http://sage.github.io/SData-2.0/pages/core/0300/

The documentation referenced above covers topics such as paging and controlling the collections of data returned.

The query language conditions are explained here:

http://sage.github.io/SData-2.0/pages/core/0212/

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

The file provided here 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.

  • Share
  • History
  • More
  • Cancel
Recommended
Sage
Africa & Middle East Canada France Portugal Spain United Kingdom & Ireland United States Global Solutions
  • facebook
  • instagram
  • linkedin
  • youtube
COMMUNITY
  • Site help
  • Site map
COMPANY
  • Overview
  • About us
  • Careers
  • News
  • Sage events
  • Investors
  • Sage Foundation
PARTNERS
  • Sage Partner Program
  • Partner Hub
  • Developers & ISVs
  • Sage Marketplace
SUPPORT & TRAINING
  • Contact Support
  • Sage Knowledgebase
  • Sage University
  • Sage Advice Blog
  • © Sage Group plc 2024
  • Privacy
  • Cookies
  • Community guidelines
  • General data protection regulation

*Community Hub is the new name for Sage City