Skip to main content
Solved

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


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

Best answer by praveenpo

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.

 

View original
Did this topic help you find an answer to your question?

3 replies

praveenpo
Semi-Pro II
Forum|alt.badge.img+3
  • Semi-Pro II
  • 99 replies
  • March 15, 2022

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.

 


  • Author
  • Freshman II
  • 14 replies
  • March 15, 2022

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


praveenpo
Semi-Pro II
Forum|alt.badge.img+3
  • Semi-Pro II
  • 99 replies
  • Answer
  • March 15, 2022

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


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