Wednesday 18 January 2012

How to use Crm 2011 OData interface

http://dev1/KelvinPlayground/XRMServices/2011/OrganizationData.svc

http://dev1/KelvinPlayground/XRMServices/2011/OrganizationData.svc/ContactSet(guid'44b4727c-6419-e111-b506-00155d321b47')

http://dev1/KelvinPlayground/XRMServices/2011/OrganizationData.svc/ContactSet(guid'44b4727c-6419-e111-b506-00155d321b47')/FirstName

http://dev1/KelvinPlayground/XRMServices/2011/OrganizationData.svc/ContactSet(guid'44b4727c-6419-e111-b506-00155d321b47')/FirstName/$value
Result: Brain

// Related records
http://dev1/KelvinPlayground/XRMServices/2011/OrganizationData.svc/ContactSet(guid'44b4727c-6419-e111-b506-00155d321b47')/Contact_Emails

$orderby [asc | decs]

Paging
$skip
$top

Filtering
$filter

http://dev1/KelvinPlayground/XRMServices/2011/OrganizationData.svc/ContactSet?$orderby=FullName desc

http://dev1/KelvinPlayground/XRMServices/2011/OrganizationData.svc/ContactSet?$top=2&$skip=3

http://dev1/KelvinPlayground/XRMServices/2011/OrganizationData.svc/ContactSet?$filter=FullName eq 'Susan Burk (Sample)'

//Get detialed info from related entity
http://dev1/KelvinPlayground/XRMServices/2011/OrganizationData.svc/ContactSet?$expand=account_primary_contact

//ONly show some fields
http://dev1/KelvinPlayground/XRMServices/2011/OrganizationData.svc/ContactSet?$select=FullName, AnnualIncome

//What entities are avaiable
//Options will not be available
http://dev1/KelvinPlayground/XRMServices/2011/OrganizationData.svc/$metadata

Some basic syntax



Another interesting thing: Microsoft data market where you can publish you crm data here via odata.

1 comment:

  1. Great ! Thanks a lot for posting post on CRM. I have been searching for an effective business card scanner to make all the processing easier. I will try to learn all about the usage of CRM.
    www.scanshell-store.com/portable-duplex-scanner.htm

    ReplyDelete