Skip to main content
Solved

The given key was not present in the dictionary Error

  • 16 January 2024
  • 5 replies
  • 446 views

Forum|alt.badge.img+2
  • Varsity I
  • 279 replies

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
Did this topic help you find an answer to your question?

5 replies

praveenpo
Semi-Pro II
Forum|alt.badge.img+3
  • Semi-Pro II
  • 92 replies
  • January 16, 2024

hi @Ivan ,

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

I think Instead of OrderNbr you should pass ReceiptNbr


Forum|alt.badge.img+2
  • Author
  • Varsity I
  • 279 replies
  • January 16, 2024
praveenpo wrote:

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


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • 680 replies
  • January 16, 2024

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.

 

 


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • 680 replies
  • Answer
  • January 17, 2024

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.


Forum|alt.badge.img+2
  • Author
  • Varsity I
  • 279 replies
  • January 19, 2024
jinin wrote:

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


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