Skip to main content
Solved

The given key was not present in the dictionary Error

  • 16 January 2024
  • 5 replies
  • 325 views

Hi,

I am receiving error “The given key was not present in the dictionary", when I am trying to make request to Purchase Receipt entity

Here is URL of my request:  https://aiimy.acumatica.com/entity/ARTSDocAlphaEndpoint/20.200.001/PurchaseReceipt?$expand=Details&$select=VendorID,ReceiptNbr,Details/POOrderNbr,Details/InventoryID,Details/LineNbr,Details/ReceiptQty&$filter=OrderNbr eq 'PO001283' and VendorID eq 'AAVENDOR'

This request worked previously, maybe something has chnaged in Acumatica

I checked endpoint for fields availbality and they are all present

Header section 

Footer section 

I attach full stack trace, maybe it helps

Its Acumatica 21.211.0033

hi @Ivan ,

I Suspect issue is with your filter $filter=OrderNbr eq 'PO001283' 

I think Instead of OrderNbr you should pass ReceiptNbr


hi @Ivan ,

I Suspect issue is with your filter $filter=OrderNbr eq 'PO001283' 

I think Instead of OrderNbr you should pass ReceiptNbr

But I neeed to perfrom such search by OrderNbr. I need to find ReceiptNbr that linked to such OrderNbr


Hi @Ivan 

As @praveenpo  indicated, the issue lies with the filter field OrderNbr. It should be ReceiptNbr, and always use the Type field (both are key fields). Sometimes, if you use the same numbering sequence with a different type, you may not receive the exact result.

 

 


Hi @Ivan ,

If we use the Purchase Order entity and retrieve the POReceipt against the POOrder, would the following query work for you?

/entity/ExtnEndpoint/20.200.001/PurchaseOrder/?$expand=POHistory&$select=POHistory/POType,POHistory/PONumber&$filter=OrderNbr eq 'PO002035'

Alternatively, you could create a Generic Inquiry and incorporate the custom endpoint entity to test.


Hi @Ivan ,

If we use the Purchase Order entity and retrieve the POReceipt against the POOrder, would the following query work for you?

/entity/ExtnEndpoint/20.200.001/PurchaseOrder/?$expand=POHistory&$select=POHistory/POType,POHistory/PONumber&$filter=OrderNbr eq 'PO002035'

Alternatively, you could create a Generic Inquiry and incorporate the custom endpoint entity to test.

Thank you


Reply