Hi Everyone
I am trying to populate Edm.Int64 and EnumType fields in some MS D365 FnO tables like BudgetScenario and PurchaseOrderLinesV2. Problem is I am not able to figure out how to pass the values in JSON format to odata service using Postman.
Look at the Request I used and corresponding responses I received.
BudgetScenarios -> Request -
{
"Name": "some sample name here",
"Description": "random desc",
"UnitOfMeasureClass": "1"
}
Error in response ->
"innererror": {
"message": "Write failed for table row of type 'BudgetPlanScenarioEntity'. Infolog: Warning: Field 'Unit of measure' must be filled in.; Warning: validateWrite failed on data source 'BudgetPlanScenario (BudgetPlanScenario)'.", ----------------------> Removed some part of error as stacktrace is huge.
PurchaseOrderLinesV2 -> After some googling and documentation reading. I used IEEE754Compatible=true in content-type header and still did not work for Edm.Int64 value.
Request :
{
"PurchaseOrderNumber":"1234567802",
"LineNumber": "10",
"dataAreaId":"dat"
}
Response : Error Message when LineNumber is -------> "10"
"message": "Write validation failed for table row of type 'PurchPurchaseOrderLineV2Entity'. Infolog: .",
"type": "Microsoft.Dynamics.Platform.Integration.Services.OData.AxODataValidateWriteException",
Response : Error message when LineNumber is -------------> "10.00"
"message": "Cannot convert the literal '10.00' to the expected type 'Edm.Int64'.",
"type": "System.InvalidOperationException",
Can anybody help in identifying where I went wrong with this.
If there is any documentation for this somewhere on how to send field specific info to FnO Odata then please provide the link. BTW I tried to send Enum value in the format it is used for querying like Microsoft.Dynamics.DataEntities.UnitOfMeasureClass'VALUE'. no results.
Any help is appreciated.
Thanks