Hi,
I have created custom fields in LogisicsPostalAddress table. I am pushing data through Postman using Odata call.
Below is my request in postman Odata post call
{
"dataAreaId": "USRT",
"CustomerLegalEntityId": "USRT",
"CustomerAccountNumber": "1001",
“AddressStreet": "3900 Great Plains",
"AddressCity": "City1",
"AddressZipCode": "58104",
"AddressCountryRegionId": "USA",
"AddressDescription": "Address_check",
"CustomField": null
}
If I pass value null to custom fields , it is throwing error as
“An exception of type 'System.NullReferenceException' occurred in aoskernel.dll but was not handled in user code”
"internalexception": {
"message": "Object reference not set to an instance of an object.",
"type": "System.InvalidOperationException",
"stacktrace": " at Microsoft.Dynamics.Platform.Integration.Services.OData.AxODataEntityDeserializer.ReadODataBody[T](HttpRequestMessage request)"
“
But if I pass null to standard fields as below it is not throwing any error and creating the record.
{
"dataAreaId": "USRT",
"CustomerLegalEntityId": "USRT",
"CustomerAccountNumber": "1001",
“AddressStreet": "3900 Great Plains Dr S",
"AddressCity": null,
"AddressState": null,
"AddressZipCode": "58104",
"AddressCountryRegionId": "USA",
"AddressDescription": "Address_check",
"CustomField": “Sample value”
}
Can someone please let me know what should I do so that I can pass null values to custom fields as well
Thanks