OData / lab

This repository is for exploring new ideas and developing early prototypes of various OData stacks.
Other
48 stars 59 forks source link

Unable to create new record #71

Closed tchuan closed 7 years ago

tchuan commented 7 years ago

Using following code to create new record: var entity = new my_entity(); _crmContext.AddObject('my_entityset_name', entity); _crmContext.SaveChanges(); But enocuntered this error: "message": "Invalid type for entity id value", "type": "System.ServiceModel.FaultException1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]", ` Any suggestion? And when adding new object, how to only send set properties?

tchuan commented 7 years ago

Resolved. Use SaveChangesOptions.PostOnlySetProperties when save changes.