Solved

The given key was not present in the dictionary Error

  • 16 January 2024
  • 5 replies
  • 152 views

Userlevel 4
Badge +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

icon

Best answer by jinin 17 January 2024, 19:34

View original

5 replies

Userlevel 6
Badge +3

hi @Ivan ,

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

I think Instead of OrderNbr you should pass ReceiptNbr

Userlevel 4
Badge +2

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

Userlevel 7
Badge +11

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.

 

 

Userlevel 7
Badge +11

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.

Userlevel 4
Badge +2

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


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved