Hello Community!!,
Using SalesDemo, I am trying to add/update One Line item in Appointment Details with ActualQty, having Line type as "Non-Stock Item" through Postman PUT call using the “Appointment” EndPoint.
Add Scenario:
- If the ActualQty is not included in the JSON request or if added as null then ActualQty is saving as 1.00 by default.
- But when I try to insert any value for ActualQty field I am getting an error as "exceptionMessage": "An error occurred during processing of the field Qty: Specified cast is not valid..".
Update scenario:
- If the ActualQty is not incuded in the JSON request then the other fields are updating with out any error.
- If the ActualQty value is null then getting "error": "'BaseEffTranQty' cannot be empty.; 'BaseEffTranQty' cannot be empty.; BaseEffTranQty: 'BaseEffTranQty' cannot be empty.". Tried including the BaseEffTranQty but no fields are udpating.
-
If the AcutalQty has any value such as 2, 2.0, 2.000000 or “2” then getting an "exceptionMessage": "An error occurred during processing of the field Qty: Specified cast is not valid..".
PUT Call: http://localhost/SalesDemo/entity/Default/20.200.001/Appointment?$expand=Details
JSON request :
{
"AppointmentNbr": {
"value": "005807-1"
},
"ServiceOrderType": {
"value": "SUPP"
},
"Details": <
{
//"id": "269ad423-1798-ee11-aa65-c8f750455784",
"LineType": {
"value": "Non-Stock Item"
},
"InventoryID": {
"value": "CARRENT"
},
"Description": {
"value": "Car and vehicle charges"
},
"ActualQty": {
"value": 2.000000
},
"BillableQty": {
"value": 1.000000
},
"EstimatedQty": {
"value": 1.000000
},
"note": {
"value": "Notes for testing from Postman"
}
}
]
}
Thank you.