Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Send Attachment (PDF,jpg and so on) through OData web services

Posted on by 5

Hi,

I'm building a solution where I connect our system to NAV. We use OData web services to transfer data like accounts, Currency codes and so on. Now I'm trying to send Invoice attachment from out system to NAV and I can't seem to find a way to do this. Does anyone have experience with this and can point me in the right direction?

  • Suggested answer
    RE: Send Attachment (PDF,jpg and so on) through OData web services

    Add a field called InvoiceBASE64 (declare a global variable type text without length for it) in your ODATA web service page.

    Create a validate trigger that decodes it to a BLOB (if you are on a never NAV version you have functions on the TempBlob table for that) and store it whereever you like.

    In your system you simply convert the invoice attachment to BASE64 and send the BASE64 (allowed/readable characters) to the new InvoiceBASE64 field in the OData webservice.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans