Skip to main content
Solved

The given key was not present in the dictionary Error

  • Jan 16, 2024 2:21 PM UTC
  • 5 replies
  • 751 views
  • Translate All

Forum|alt.badge.img+2

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

Best answer by jinin

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.

View original

5 replies

praveenpo
Semi-Pro III
Forum|alt.badge.img+3
  • Semi-Pro III
  • Jan 16, 2024 2:28 PM UTC

hi @Ivan ,

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

I think Instead of OrderNbr you should pass ReceiptNbr

Translate

Forum|alt.badge.img+2
  • Author
  • Varsity I
  • Jan 16, 2024 2:30 PM UTC

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

Translate

jinin
Pro I
Forum|alt.badge.img+12
  • Pro I
  • Jan 16, 2024 4:40 PM UTC

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.

 

 

Translate

jinin
Pro I
Forum|alt.badge.img+12
  • Pro I
  • Answer
  • Jan 17, 2024 6:34 PM UTC

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.

Translate

Forum|alt.badge.img+2
  • Author
  • Varsity I
  • Jan 19, 2024 4:13 PM UTC

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

Translate