Skip to main content

Notifications

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

Transferring XML Files though API in Business Central

Posted on by 161

Problem Statement: We want to store XML file in Business central with some information (Ex. Payment Details) From another System. Want to update status field of one custom table by Reading that XML file.

 

Question 1:

Is it possible to receive an xml file from third party system through API in Business Central.

If so, then is that applicable for N Number of XML Files?

 

Question 2:

We know that we can receive an content of an xml file in a text field. But due to the Size restriction we cannot use

Text field for file content. Is there any alternate way for receiving the Content of a XML File irrespective of its size?

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 73,171 Super User 2024 Season 2 on at
    RE: Transferring XML Files though API in Business Central

    Hi, Yes, you can do it.

    I think the easiest way is to save the XML file as an attachment. (Max file size 350MB)

    More details: How to limit max file size for uploading attachment (Customization)

    https://yzhums.com/26649/

    pastedimage1675209475269v1.png

    In addition, if you consider using an XML file because of the size of the Text file, you can save the obtained data in the Blob type.

    Below are some usage examples of the Blob type, hoping to give you some hints.

    https://yzhums.com/27951/

    https://yzhums.com/33823/

    Thanks.

    ZHU

  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,748 Super User 2024 Season 1 on at
    RE: Transferring XML Files though API in Business Central

    When I have done this i have sent the xml files encoded as a base64 string. And that works pretty well.

  • Suggested answer
    DAnny3211 Profile Picture
    DAnny3211 9,272 Super User 2024 Season 1 on at
    RE: Transferring XML Files though API in Business Central

    hi

    sure you can expose an xml port within a Codeunit

    in this way you have no file length limitation

    Daniele

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 229,993 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans