Tuesday, January 29, 2013

Raw WCF ODATA examples for CRM 2011

This returns the WSDL:

http://crmdevmt.develop.fcbt:5555/JamesDev/XRMServices/2011/OrganizationData.svc/fcb_costbillingservicecategorySet(guid'4fadffb7-4a45-e211-9621-005056862bb8')

This returns the entire set
http://crmdevmt.develop.fcbt:5555/JamesDev/XRMServices/2011/OrganizationData.svc/fcb_costbillingservicecategorySet

This returns a specific record
http://crmdevmt.develop.fcbt:5555/JamesDev/XRMServices/2011/OrganizationData.svc/fcb_costbillingservicecategorySet(guid'4fadffb7-4a45-e211-9621-005056862bb8')

This returns a single field
http://crmdevmt.develop.fcbt:5555/JamesDev/XRMServices/2011/OrganizationData.svc/fcb_costbillingservicecategorySet(guid'4fadffb7-4a45-e211-9621-005056862bb8')/fcb_name

This returns a single field value only without metadata:
http://crmdevmt.develop.fcbt:5555/JamesDev/XRMServices/2011/OrganizationData.svc/fcb_costbillingservicecategorySet(guid'4fadffb7-4a45-e211-9621-005056862bb8')/fcb_name/$value

This returns an ordered set:
http://crmdevmt.develop.fcbt:5555/JamesDev/XRMServices/2011/OrganizationData.svc/fcb_costbillingservicecategorySet?$orderby=fcb_name desc

This gets an ordered set, the top 1 after skipping 2:
http://crmdevmt.develop.fcbt:5555/JamesDev/XRMServices/2011/OrganizationData.svc/fcb_costbillingservicecategorySet?$orderby=fcb_name desc&$top=1&$skip=2

This filters by a specific field"
http://crmdevmt.develop.fcbt:5555/JamesDev/XRMServices/2011/OrganizationData.svc/fcb_costbillingservicecategorySet?$filter=fcb_name eq 'Category 3'

Compound filter
http://crmdevmt.develop.fcbt:5555/JamesDev/XRMServices/2011/OrganizationData.svc/fcb_costbillingservicecategorySet?$filter=fcb_name eq 'Category 3' or fcb_name eq 'Category 2'

This gets specific fields from the table instead of every one:
http://crmdevmt.develop.fcbt:5555/JamesDev/XRMServices/2011/OrganizationData.svc/fcb_costbillingservicecategorySet(guid'4eadffb7-4a45-e211-9621-005056862bb8')?$select=fcb_name,ModifiedOn

This gets basic Metadata about the service: (list of attributes, types etc)
http://crmdevmt.develop.fcbt:5555/JamesDev/XRMServices/2011/OrganizationData.svc/$metadata



No comments:

Post a Comment