REST Endpoint or OData operations in MS CRM 2011-Part 1
To locate and retrieve data with the REST Endpoint, manipulate
URI.
The organization root URL must include organization.
We can retrieve service root URI by using Xrm.Page.context.getServerUrl
Each MS CRM 2011 entity is represented in the conceptual
schema definition language (CSDL).
The Naming convention is [Entity Schema name] Set
MS CRM 2011 entity attributes. Each property is assigned a
data type that corresponds to one of the primitive Entity Data Model (EDM) data
types or Complex type defined for MS CRM.
Complex Types:
1.
Microsoft.Crm.Sdk.Data.Services.EntityReference àrepresents
EntityReference and Customer Owner.
2.
Microsoft.Crm.Sdk.Data.Services.OptionSetValueàOptionSetValue, State
and Status.
3.
Microsoft.Crm.Sdk.Data.Services.MoneyàMoney
4.
Microsoft.Crm.Sdk.Data.Services.BooleanManagedPropertyàBooleanMangedProperty
Entity Reference
Name
|
Type
|
Id
|
GUID
|
LogicalName
|
String
|
Name
|
Sting
|
Ex: set entity
reference to entity
entity.StateProvince = { Id:”xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx”,
LogicalName: "name of the entity",
Name: “record name” };
OptionSetValue
Name
|
Type
|
Value
|
Number
|
Ex: set OptionSetValue
Logical
name of ubs_BillingConsumptionType is ubs_billingconsumptiontype
entity.ubs_BillingConsumptionType={ Value: 5 };
Money
Name
|
Type
|
Value
|
Number
|
Ex: Set Money
entity.Limit={ Value =100.00}
Note: attribute name is case sensitive (it means
attribute name must be equal to the OData attribute Name. check the names by retrieve
Query).
Comments