Solved

Check API Issue when adding Application history object in API with date range filter

  • 15 March 2022
  • 3 replies
  • 140 views

Userlevel 2

Hello Everyone,

We are trying to make a get call for checks and payments screen to get all the checks along with application history tab details within a date range.

I have provided the lastmodifieddatetime for date range filter and it is working fine but when i add the history object to the API URL, I’m getting optimization cannot be performed error in the GET call.

I have used below URL.

http://localhost/MyInstance/entity/Default/20.200.001/Check?$filter=LastModifiedDateTime ge datetimeoffset'2022-02-08T23:59:59.99Z' and LastModifiedDateTime le datetimeoffset'2022-02-13T23:59:59.99Z'&$expand=History

 

Error details:

"message": "An error has occurred.",

    "exceptionMessage": "Optimization cannot be performed.The following fields cause the error:\r\nHistory.AmountPaid: View APPost has BQL delegate\r\nHistory.Balance: View APPost has BQL delegate\r\nHistory.CashDiscountBalance: View APPost has BQL delegate\r\nHistory.CashDiscountTaken: View APPost has BQL delegate\r\nHistory.DocType: View APPost has BQL delegate\r\nHistory.ReferenceNbr: View APPost has BQL delegate\r\nHistory.VendorRef: View APPost has BQL delegate\r\n",

 

What is the issue here? Can anybody suggest the solution to get all the checks with history tab details with date range filter in API?

Thanks

icon

Best answer by praveenpo 15 March 2022, 15:17

View original

3 replies

Userlevel 5
Badge

Hi @ssamboju12 ,

This is the limitation with Acumatica, History  section view has the view delegate implemented and all records cannot be fetched.

Need to pass the individual RefNbr in the request.

 

Userlevel 2

Hello @praveenpo 

 

Thank you for the quick response.

 

What is the alternate solution for this? Is Acumatica addressing this issue? Do you have any idea?

 

Using individual refnbr has worked for us, but it’s not useful for our requirement

Userlevel 5
Badge

hi @ssamboju12 ,

No idea on solution for this but as an alternate approach  need to make 2 calls.

1) Make API call with date filter and get refnbr.

2).Pass the RefNbr in request which got from first call results and get the full data.

 

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 — 2022  Acumatica, Inc. All rights reserved