Skip to main content
Answer

Get ApplicationHistory from Payment object

  • July 18, 2022
  • 2 replies
  • 138 views

Hello,

How can I get applications for payment object with REST Api? When I try to run such a query

https://companyname.acumatica.com/entity/Sites/20.200.001.0/Payment?$filter=PaymentRef+eq+'035530'&$expand=ApplicationHistory

I got such error:

Optimization cannot be performed.The following fields cause the error:\r\nApplicationHistory.AdjustedDocType etc

Best answer by ruchikasharma23

Hi @Leo05,
        
To fix this error, you have the following options:
• If you do not need to retrieve the fields of the ApplicationHistory detail entity, you can exclude these fields and the ApplicationHistory entity from the request.
• If you need to retrieve the fields of the ApplicationHistory detail entity, you can retrieve the needed records one by one by the key fields

To learn about this error in detail and an example of the fix, you can refer to Page 18 & 28 of I320 course
https://openuni.acumatica.com/wp-content/uploads/2017/08/I320_WebServicesDataRetrievalAdvanced_2022R1.pdf

2 replies

Forum|alt.badge.img+3
  • Acumatica Moderator
  • Answer
  • July 18, 2022

Hi @Leo05,
        
To fix this error, you have the following options:
• If you do not need to retrieve the fields of the ApplicationHistory detail entity, you can exclude these fields and the ApplicationHistory entity from the request.
• If you need to retrieve the fields of the ApplicationHistory detail entity, you can retrieve the needed records one by one by the key fields

To learn about this error in detail and an example of the fix, you can refer to Page 18 & 28 of I320 course
https://openuni.acumatica.com/wp-content/uploads/2017/08/I320_WebServicesDataRetrievalAdvanced_2022R1.pdf


  • Author
  • Freshman I
  • July 19, 2022