Solved

Get ApplicationHistory from Payment object


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

icon

Best answer by ruchikasharma23 18 July 2022, 20:28

View original

2 replies

Userlevel 5
Badge +2

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

Thanks. I found we should use request the other way round

https://companyname.acumatica.com/entity/Sites/20.200.001.0/Payment/Payment/035530?$expand=ApplicationHistory

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