Solved

Upload attachment to bill endpoint failes

  • 24 February 2021
  • 1 reply
  • 206 views

I'm trying to upload an attachment to the endpoint bill in Acumatica Rest API but gets the error
"Operation is not valid due to the current state of the object".
I’m using the RestService class from  the Wiki page and the same PutFile function.

Rs.PutFile("Bill", "bf73fde2-2a71-eb11-80bc-00155d79641e", "test.pdf", sr.BaseStream)
The same call for stockItem works but not for bill? Using the id as key.

Someone who has an idea :wink:

icon

Best answer by junmao01 19 July 2022, 00:26

View original

1 reply

Userlevel 2
Badge

You need use Bill Type and Reference number as key instead of id.

Use the PUT method: https://mycompany.acumatica.com/entity/Default/20.200.001/Bill/Bill/50-0008442/files/Invoice1.pdf

Please note, the first Bill is the endpoint name, the second Bill is the “Bills and  Adjustments” Type and followed by the Reference Nbr.
 

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