Open nasai5533 opened 9 months ago
I get the following exception when using a SalesLineItemDetail for AnyIntuitObject on a Line when adding a SalesReceipt: BadRequest. Details: Required parameter Line.SalesItemLineDetail is missing in the request
@nasai5533, I am receiving a different error,
Intuit.Ipp.Exception.IdsException: 'BadRequest. Details: Required parameter Line.DetailType is missing in the request , '
I am including the Line.Detail Type = LineDetailTypeEnum.SalesItemLineDetail. Would you mind sharing your code to create a Sales Receipt?
I get the following exception when using a SalesLineItemDetail for AnyIntuitObject on a Line when adding a SalesReceipt: BadRequest. Details: Required parameter Line.SalesItemLineDetail is missing in the request
@nasai5533, I am receiving a different error,
Intuit.Ipp.Exception.IdsException: 'BadRequest. Details: Required parameter Line.DetailType is missing in the request , '
I am including the Line.Detail Type = LineDetailTypeEnum.SalesItemLineDetail. Would you mind sharing your code to create a Sales Receipt?
You have to both set the DetailType and set DetailTypeSpecified to true
Ah yes! That works! Weird, but o.k., thanks so much!
No problem! And yes, it's a paradigm sometimes used in languages which don't allow for nullable value types. In the case they receive a call from you where the value for the DetailType property has been left at its default value, they want to be sure you actually intended to use the default value rather than forgot to set it.
Because .NET allows for nullable value types, they could have easily set the type of the property to LineDetailTypeEnum? or Nullable
I get the following exception when using a SalesLineItemDetail for AnyIntuitObject on a Line when adding a SalesReceipt: BadRequest. Details: Required parameter Line.SalesItemLineDetail is missing in the request
This appears to happen when I use the SalesItemLineDetail object without setting any of its properties. If I set any property, say ServiceDate and ServiceDateSpecified, it works. Without setting a property, the object gets serialized as
<SalesLineItemDetail/>
, which for some reason gets rejected. Since according to the documentation all properties of SalesItemLineDetail are optional, I believe the intended functionality should be for an empty SalesItemLineDetail to be accepted.This works:
AnyIntuitObject = new SalesItemLineDetail() { ServiceDate = DateTime.Now, ServiceDateSpecified = true }
This works:
AnyIntuitObject = new SalesItemLineDetail() { Qty = 1, QtySpecified = true }
This does not work:
AnyIntuitObject = new SalesItemLineDetail()