Solved

How to insert/map a file under Files for a Sales Order record through code

  • 12 March 2024
  • 1 reply
  • 49 views

Hi Team,

We are working with Build 23.112.0032 and working on a customization where we have to add an image url ( https://xyz.s3.amazonaws.com/kkltQWuXULPcHQ6TmoMsZkiJOK93x8.png) as File attachment to a Sales Order record through code. We tried to insert this image url under Name field in UploadFile table and later to map this record along with Sales Order NoteID under NoteDoc table but we are facing issue with approach. Can you please suggest the best possible way to achieve this.

 

Thank you in advance!

 

icon

Best answer by DavidEichner 1 April 2024, 20:22

View original

1 reply

Userlevel 7
Badge +10

Hi @maneeshau91 

The best way we have found to attach files to records in Acumatica is to make API calls.  As an example, for a client needing service call history records to have multiple file attachments (images, PDF, excel, word, etc.) from a legacy system, we extracted those files from the legacy system into a folder with filename starting with the service order number and service order type.  We then wrote a simple console app in C# that looped through the folder reading the files, logging into the API and uploading the files to attach them to the service orders.  It would be slightly different code to attach to a sales order with the order number and the order type.

Best,

David

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