web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Add an attachemnt file to Item Card

(5) ShareShare
ReportReport
Posted on by 60
Hi
I'm trying to send a file as attachment to an item in BC.
I saw many example with invoice and other document but no one regarding the Item.
anyone tried with power automate?

Thanks
Emilio
I have the same question (0)
  • Suggested answer
    Jainam M. Kothari Profile Picture
    15,639 Super User 2025 Season 2 on at
  • Suggested answer
    Suresh Kulla Profile Picture
    50,245 Super User 2025 Season 2 on at
    The process is no different; the parameters or values on the document attachment will change based on the table you are attaching. In this case, it would be table 27.

    Are you experiencing any issues?
     
     
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    20,643 Super User 2025 Season 2 on at
  • EG-21030933-0 Profile Picture
    60 on at
    Thank you all for your support.
    My scope is to load the files from a directory; every files have as name the Item No., but first i need start to load one single file and then  i will manage the other part of my flow.
    I've already tested the attachment of a file in the sales Order and it works.

    this is the error 
    
    Action 'Crea_record_(V3)' failed: ErrorCode: Application_DialogException Parent type Item is not supported. Use documentAttachments API instead. CorrelationId: 540218e6-1344-476d-a3de-de5b16869218. clientRequestId: 576f9e0d-4e3c-44f2-815e-a0b7118071e1
     

    ok, Item is not a parent Item Supported
    so, if i go to table 1173 in BC the lines suggested a relation  between table 27 (items) and parent type is Sales Offer (I don't understand the reason... but it is), so i modify Item in Parent Type to Sales_x0020_Quote.
     
    
    Action 'Crea_record_(V3)' failed: ErrorCode: Internal_EntityWithSameKeyExists The record in table Unlinked Attachment already exists. Identification fields and values: Id='{00000000-0000-0000-0000-000000000000}' CorrelationId: b084e62b-0b44-4ac9-84b3-d3cc2f222984. clientRequestId: c7bd96b3-6f86-4b45-8408-9c16cf4ece01

    i think this is correct, i can't link an ID of an Item to an ID of an oFFER!!!
     
    Any other suggestions?

    thank you  for your help!!!
  • Suggested answer
    Gerardo Rentería García Profile Picture
    25,369 Most Valuable Professional on at
  • Verified answer
    YUN ZHU Profile Picture
    95,741 Super User 2025 Season 2 on at
    This is a bit tricky because there is no API for the standard attachment functionality.
    Hopefully the following information can give you some hints.
    How to automatically upload files from OneDrive to Business Central with Power Automate (No customization)
    Dynamics 365 Business Central: Using OData V4 unbound action (Codeunit API?) to communicate and exchange data seamlessly
     
    Thanks.
    ZHU
  • EG-21030933-0 Profile Picture
    60 on at
    hello, thank you for your help.
    i've already tried with odata via web services.
    I used page 1173 and this is the result fomr the API with GET via Postman
    {
                "@odata.etag": "W/\"JzE5OzY5Njg5ODg2NDMzMjI5NTk0ODIxOzAwOyc=\"",
                "Table_ID": 27,
                "No": "IM-111111",
                "Document_Type": "Quote",
                "Line_No": 0,
                "ID": 4,
                "Name": "IM-111111",
                "File_Extension": "dwg",
                "Tipo_Documento": "Da Definire",
                "Description_Document_PTE": "",
                "Revisione": "",
                "Data_Revisione": "0001-01-01",
                "File_Type": "Other",
                "User": "Eg,
                "Attached_Date": "2024-04-23T14:44:21.727Z",
                "Document_Flow_Purchase": false,
                "Document_Flow_Sales": false,
                "Document_Flow_Service": false
            },
    It seems i have all the information i need, but is still missing the field where (BLOB type?) where i can post the file in traduced in Base64.

     
    so, do need i add tfield in the page (1173) with visual studio????

    Many thanks
    P.S: ZHU thank you for your posts, they help me a lot !!
  • Gerardo Rentería García Profile Picture
    25,369 Most Valuable Professional on at
  • Vahid Ghafarpour Profile Picture
    12,183 Super User 2025 Season 2 on at

    If any of the responses helped resolve your issue, please take a moment to mark the best answer. This helps others in the community quickly find solutions to similar problems.

    To do this, simply click the "Does this answer your question?" button on the most helpful response and like the helpful posts. If your issue is still unresolved, feel free to provide more details so the community can assist further!

    Thanks for being an active part of the Dynamics 365 Community! 😊

     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,066

#2
YUN ZHU Profile Picture

YUN ZHU 658 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 595

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans