HI Lea ,
Thanks for your reply . I think i am following the rule as i am able add from UI. I have created a case manually with Customer and Contact link. In postman i get that Case/Incident . Using that that get structure i am trying to post same type of structure for Customer and Contact.
Below is my Get structure :
"value": [
{
"@odata.etag": "W/\"82093082\"",
"statecode": 0,
"resolvebyslastatus": 1,
"statuscode": 100000000,
"createdon": "2021-02-24T11:16:16Z",
"_customerid_value": "89d10845-a0a1-ea11-a812-000d3a0a8282",
"ticketnumber": "CAS-04765-Z5F2F4",
"crf50_lastnotificationsenton": "2021-02-24T11:26:08Z",
"adx_publishtoweb": false,
"severitycode": 1,
"_ownerid_value": "31bb1a1c-0d91-ea11-a811-000d3a0a8315",
"servicestage": 0,
"modifiedon": "2021-02-24T11:26:08Z",
"title": "{#33612}: Ishaan-Pooja Twilio Test",
"decremententitlementterm": true,
"prioritycode": 2,
"crf50_basetitle": "Ishaan-Pooja Twilio Test",
"timezoneruleversionnumber": 0,
"blockedprofile": false,
"crf50_caseid": "33612",
"_modifiedby_value": "59bb1a1c-0d91-ea11-a811-000d3a0a8315",
"caseorigincode": 100000000,
"isdecrementing": false,
"firstresponseslastatus": 1,
"_primarycontactid_value": "7b4e4434-bc2f-eb11-a813-000d3a0a8282"
}
]
1) I am getting error below when send attribute as customerid_accountcustomerid_contact@odata.bind and primarycontactid@odata.bind
"error": {
"code": "0x0",
"message": "An error occurred while validating input parameters: Microsoft.OData.ODataException: An undeclared property 'customerid_accountcustomerid_contact' which only has property annotations in the payload but no property value was found in the payload. In OData, only declared navigation properties and declared named streams can be represented as properties without values.\r\n at Microsoft.OData.JsonLight.ODataJsonLightResourceDeserializer.ReadUndeclaredProperty(IODataJsonLightReaderResourceState resourceState, String propertyName, Boolean propertyWithValue)\r\n at Microsoft.OData.JsonLight.ODataJsonLightResourceDeserializer.ReadPropertyWithoutValue(IODataJsonLightReaderResourceState resourceState, String propertyName)\r\n at Microsoft.OData.JsonLight.ODataJsonLightResourceDeserializer.<>c__DisplayClass9_0.<ReadResourceContent>b__0(PropertyParsingResult propertyParsingResult, String propertyName)\r\n at Microsoft.OData.JsonLight.ODataJsonLightDeserializer.ProcessProperty(PropertyAndAnnotationCollector propertyAndAnnotationCollector, Func`2 readPropertyAnnotationValue, Action`2 handleProperty)\r\n at Microsoft.OData.JsonLight.ODataJsonLightResourceDeserializer.ReadResourceContent(IODataJsonLightReaderResourceState resourceState)\r\n at Microsoft.OData.JsonLight.ODataJsonLightReader.StartReadingResource()\r\n at Microsoft.OData.JsonLight.ODataJsonLightReader.ReadResourceSetItemStart(PropertyAndAnnotationCollector propertyAndAnnotationCollector, SelectedPropertiesNode selectedProperties)\r\n at Microsoft.OData.JsonLight.ODataJsonLightReader.ReadAtStartImplementationSynchronously(PropertyAndAnnotationCollector propertyAndAnnotationCollector)\r\n at Microsoft.OData.ODataReaderCore.ReadImplementation()\r\n at Microsoft.OData.ODataReaderCore.InterceptException[T](Func`1 action)\r\n at System.Web.OData.Formatter.Deserialization.ODataReaderExtensions.ReadResourceOrResourceSet(ODataReader reader)\r\n at System.Web.OData.Formatter.Deserialization.ODataResourceDeserializer.Read(ODataMessageReader messageReader, Type type, ODataDeserializerContext readContext)\r\n at System.Web.OData.Formatter.ODataMediaTypeFormatter.ReadFromStream(Type type, Stream readStream, HttpContent content, IFormatterLogger formatterLogger)"
}
2) when send data as "_customerid_value": "89d10845-a0a1-ea11-a812-000d3a0a8282" "_primarycontactid_value": "7b4e4434-bc2f-eb11-a813-000d3a0a8282"
"error": {
"code": "0x0",
"message": "CRM do not support direct update of Entity Reference properties, Use Navigation properties instead."
I can't understand what will be exact format for above two fileds.
Thanks
Surajit