Reading Attachments through API

By | May 13, 2021

Attachments are useful in maintaining a track of any supportive documents added to any sale, purchase or journal entry transactions. Supporting information files/images can be attached for quotes, invoices, credit notes, payments, bills, journal entries.
For instance, one can attach a receipt, brochure, commodity images, or any such transaction documents that might prove useful to the customers or vendors.

To find details of a referenced attachment ID from GL batch, AP bill, etc., we can use Sage Intacct Web Services. They are the systematic way of retrieving data through API. These XML-based API calls are convenient means to read the complete data of any object in Intacct. We can apply queries and filter it according to our needs.

We can use the <get_list object=”supdoc”> function to read the object supdoc. Attachment IDs are stored as SUPDOCIDs in GLBatch, AP Bill, Invoice objects as shown below.

supdoc_api_request

For extracting any particular attachment data as base64 encoded string, we can query in the following way. The SUPDOCID(Attachment1) that we supplied in the below query can be retrieved by firing a read query on the desired object. The value of the field <SUPDOCID> is to be fetched from response.

supdoc_api_using_filters

The function returns all the details like name, type, base64 of the attachment and the supporting document creation details. Below is the response snippet after executing the above query:

supdoc_api_response

This is how we can fetch the details of any attachment through web services so easily. Once we get the base64 and the attachment type, we can further carry out actions that feeds it to some external program if required.

About Us

Greytrix – a globally recognized and one of the oldest Sage Development Partner is a one-stop solution provider for Sage ERP and Sage CRM organizational needs. Being acknowledged and rewarded for multi-man years of experience and expertise, we bring complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third party add-on development and implementation competence.

Greytrix has a wide product range for Sage Intacct- a Cloud ERP. This includes migrations from QuickBooks | Sage 50 | Sage 100 | Sage 300 to Sage Intacct. Our unique GUMU™ integrations include Sage Intacct for Sage CRM | Salesforce | FTP/SFTP | Rev.io | Checkbook | Dynamics 365 CRM | Magento | Rent Manager | Treez | Avalara Avatax | Blackline SFTP. We also offer best-in-class Sage Intacct Development Services, Consulting services, integrated apps like POS | WMS | Payroll | Shipping System | Business Intelligence | eCommerce for Sage Intacct to Sage business partners, resellers, and Sage PSG worldwide. Greytrix constantly develops apps, products, and add-ons to enhance user experience. Sage Intacct add-ons include AR Lockbox File Processing. Greytrix GUMU™ integration for Sage CRM – Sage Intacct, Sales Commission App for Sage Intacct, and Checkbook.io ACH/Digital Check Payments for Sage powered by GUMU™ are listed on Sage Intacct Marketplace.

The GUMU™ Cloud framework by Greytrix forms the backbone of cloud integrations that are managed in real-time for processing and execution of application programs at the click of a button.

For more information on Sage Business Cloud Services, please contact us at sagecloud@greytrix.com. We will like to hear from you.