Skip to main content
Solved

Called InventorySummaryInquiry from C#


We have setup a Connected Service in C# to our WSE endpoint, I remember from previous work with Acumatica that to access a Generic Inquiry we need to utilize the Put request.  I am trying this on the InventorySummaryInquiry to get the list of locations available for an item but am getting an error saying the select, filter, expand and custom fields need to be supplied, if I attempt to supply values for each of these then it fails because I am not able to determine exactly what should be supplied for expand or custom.

Should I be using something else here?

InventorySummaryInquiry inquiryData = await inquiryClient.PutEntityAsync(new InventorySummaryInquiry() { InventoryID = new StringValue() { Value = e.RequestData.ItemName }, ExpandByLotSerialNbr = new BooleanValue() { Value = true } }, "", "", "", "");

 

The data specified in the request is invalid.

Status: 400
Response: 
{"message":"The request is invalid.","modelState":{"$select.String":["A value is required but was not present in the request."],"$filter.String":["A value is required but was not present in the request."],"$expand.String":["A value is required but was not present in the request."],"$custom.String":["A value is required but was not present in the request."]}}

Best answer by cmarshall74

Ah okay, I determined that I need to pass in null for the select, filter, expand and custom values.  That stops the error.

View original
Did this topic help you find an answer to your question?

5 replies

  • Author
  • Freshman II
  • 8 replies
  • Answer
  • January 11, 2022

Ah okay, I determined that I need to pass in null for the select, filter, expand and custom values.  That stops the error.


  • Author
  • Freshman II
  • 8 replies
  • January 11, 2022

The request is processing now, however, I am not getting anything back in the Results. If I don’t include the expand parameter then it returns a null Results object.

If I add “results” to the expand parameter then I get back a valid Results object with nothing in it.

InventorySummaryInquiry inquiryData = await inquiryClient.PutEntityAsync(new InventorySummaryInquiry() { InventoryID = new StringValue() { Value = e.RequestData.ItemName }, ExpandByLotSerialNbr = new BooleanValue() { Value = false } }, null, null, "results", null);
 

Results = {"ExpandByLotSerialNbr":{"value":false},"InventoryID":{"value":"AACOMPUT01"},"LocationID":{},"Results":[],"WarehouseID":{},"id":"5b56bf90-80c2-4fae-858e-c57fed31cf3f","rowNumber":1,"custom":{}}

 

Sorry for the basic questions, am getting back into the Acumatica arena after a time away.


  • Author
  • Freshman II
  • 8 replies
  • January 11, 2022

Forgot to include screenshot of the result in Acumatica

 

 


  • Author
  • Freshman II
  • 8 replies
  • January 11, 2022

Final update on this one, it is now working, not sure why it wasn’t after the changes as I haven’t done anything just came back to it to try again and now the results are being returned.


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • 2640 replies
  • January 12, 2022

Hi @cmarshall74 thank you for sharing the solution and journey :slight_smile:


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings