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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

XMLPort export xml as BigText

(1) ShareShare
ReportReport
Posted on by

Hi all

I sit possible to export the xml from xmlPort to a BigText variable?

I will not use Temp Blob as I'm re-factoring my code to meet the requirements in V.15

I have the same question (0)
  • Suggested answer
    Robert B. Profile Picture
    257 on at

    Hi Mehdi38,

      It is possible, use the new codeunit to point to a new outstream variable "Outstr" with CreateOutStream, I used UTF8 for V14, but it should work for V15 in a similar way.

      Then for your XMLPort, declare a variable MyXMLPort.

      MyXMLPort.FilterDataset(valuesToFilterWith);//use a function on the xmlport to filter your dataset

      MyXMLPort.SetDestination(OutStr);

      if MyXMLPort.Export() then;

       declare inStr variable of type InStream.

       Also declare 2 text variables without a size limit:

         Line:Text;

         XmlTxt: Text;

       use the same codeunit to CreateInstream(inStr)

       inStr.ReatText(XmlTxt);

       While not inStr.EOS do begin

          inStr.ReadText(Line);

          XmlTxt += Line;

       end;

       now your XmlTxt contains the xml you need.

    Cheers,

    Robert

    Please verify my answer, if you find it useful, that way others can find this solution easier!

  • Suggested answer
    Olister Rumao Profile Picture
    4,009 on at

    Hi Mehdi,

    It is possible to export the XMLPORT to Blob.

    docs.microsoft.com/.../blob-data-type

    Or if your data is to be appended using some logic

    You can refer my blog

    www.olisterr.tech/.../workaround-to-xmlport-is-not-supported.html

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,690 Super User 2026 Season 1

#2
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 1,091 Super User 2026 Season 1

#3
YUN ZHU Profile Picture

YUN ZHU 1,047 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans