Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Unanswered

Problem creating Attachments using the API

(0) ShareShare
ReportReport
Posted on by 20
 
Hello Team,

We are using Attachment API to add/get Attachment for different parantTypes as per the documentation 
https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/api-reference/v2.0/resources/dynamics_attachment
I have a few doubts about it:-
  1. How to attach a file while creating any Attachment using CREATE/UPDATE API
  2. Which credential should I use to access mediaReadLink from the Create response?
  3. As per the GET Attachment document parentType should be / /, /Journal/, /Sales Order/, /Sales Quote/, /Sales Credit Memo/, /Sales Invoice/ or /Purchase Invoice/. but in CREATE  if I use parentType as /Sales Invoice/   or any other from the list then in response it shows parentType as /Sales_x0020_Invoice/. So which one should we use? 
  4. We added a few Attachments manually through UI but in GET Attachment for that parentId it's showing not showing any attachments, so could you help on how to add attachments manually as well?


    Thank you in advance, your help is appreciated 



    Thanks,
    Railz

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 Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans