Skip to main content
Solved

Pulling attachment contents via OData


TimRodman
Pro I
Forum|alt.badge.img+1

I’m trying to access attachment contents over OData so I can pull Stock Item images into Excel.

 

I tried PX.SM.UploadFileRevision and PX.SM.UploadFileWithData, but the UploadFileRevision.BlobData column doesn’t appear in either a Generic Inquiry or in the OData feed.

 

Does anyone have any ideas on how I can access the raw file attachment contents?

 

Note in these screenshots that there are 5 columns in the Generic Inquiry, but only 4 columns appear in the results:

 

Best answer by Gabriel Michaud

That will definitely not work. There is no infrastructure in Excel that would allow you to have a function that returns an image in a cell or a query that includes an embedded image… I think it’s best to build this report using the Acumatica Report designer.

View original
Did this topic help you find an answer to your question?

6 replies

Gabriel Michaud
Captain II
Forum|alt.badge.img+11

It’s not possible through OData -- you have to use the standard REST API to access attachments.


TimRodman
Pro I
Forum|alt.badge.img+1
  • Author
  • Pro I
  • 144 replies
  • March 18, 2021

Bummer. Any ideas on whether or not it’s possible to use the REST APIs in an Excel connection?


Gabriel Michaud
Captain II
Forum|alt.badge.img+11

Just curious, can you explain what you were intending to do with the file binary data in Excel?


TimRodman
Pro I
Forum|alt.badge.img+1
  • Author
  • Pro I
  • 144 replies
  • March 19, 2021

I’m building an Excel file for a client that uses Slicers and Pivot Tables. This Excel file is then used by Salespeople to build lists of Stock Items for customers that include availability data and various attributes. They also want to add thumbnail images to the Excel file which are stored as attachments in Acumatica.


Gabriel Michaud
Captain II
Forum|alt.badge.img+11

That will definitely not work. There is no infrastructure in Excel that would allow you to have a function that returns an image in a cell or a query that includes an embedded image… I think it’s best to build this report using the Acumatica Report designer.


TimRodman
Pro I
Forum|alt.badge.img+1
  • Author
  • Pro I
  • 144 replies
  • March 19, 2021

Thanks Gabriel. I think I was remembering Power View which could handle images in Excel. It was the precursor to Power BI Desktop. I agree, I don’t see a way to do this in regular Excel Pivot Tables.

 

I did try doing this in Power BI Desktop. It kind of works because the client could export to PDF and send the PDF to their customer, but it’s not practical because they need to be able to save a long list of Stock Items as multiple pages, but Power BI Desktop exports everything as one page to PDF.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings