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

Community site session details

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

How to use data exchange definition , using type Generic export

(0) ShareShare
ReportReport
Posted on by 108

I create this XMLPort objet but I want to use data exhange definition , to  export a XMl File, I create a schema and dedItems.png but It don't create a XML file, and I am not sure how use that , I just want to do a easy example to understand how  export xml file using Data echange definition. because after that I will to develop something like a send invoice electronic, Could you help me? 

xmlport 50103 DCLSchemaItemsXml
{

    Format = Xml;
    Direction = Export;
    //TextEncoding = UTF8;
    UseRequestPage = false;
    //TableSeparator = '';//New line
    Encoding = UTF8;

    schema
    {
        textelement(Root)
        {
            tableelement(Integer; Integer)
            {
                XmlName = 'ItemHeader';
                SourceTableView = SORTING(Number) WHERE(Number = CONST(1));
                textelement(ItemNoTitle)
                {

                    trigger OnBeforePassVariable()
                    begin
                        ItemNoTitle := Item.FieldCaption("No.");
                    end;
                }
                textelement(ItemDescTitle)
                {

                    trigger OnBeforePassVariable()
                    begin
                        ItemDescTitle := Item.FieldCaption(Description);
                    end;
                }
                textelement(ItemTypeTitle)
                {

                    trigger OnBeforePassVariable()
                    begin
                        ItemTypeTitle := Item.FieldCaption(Type);
                    end;
                }
            }
            tableelement(Item; Item)
            {
                XmlName = 'Item';
                RequestFilterFields = "No.";

                fieldelement(No; Item."No.")
                {
                }
                fieldelement(Description; Item.Description)
                {
                }
                fieldelement(Type; Item.Type)
                {
                }
            }
        }
    }

}
I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    89,846 Super User 2025 Season 2 on at
    RE: How to use data exchange definition , using type Generic export

    Hi, the information provided by Inge should be helpful.

    Just another idea, using Report Object to export XML file.

    More details: https://yzhums.com/23173/

    Hope this also helps

    Thanks.

    ZHU

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,035 Moderator on at
    RE: How to use data exchange definition , using type Generic export

    Maybe some of these links can help you:

    docs.traser-software.de/.../across-how-to-set-up-data-exchange-definitions.html

    docs.microsoft.com/.../across-set-up-data-exchange

    www.youtube.com/watch

    www.youtube.com/watch

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…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,899 Super User 2025 Season 2

#2
Sumit Singh Profile Picture

Sumit Singh 2,444

#3
Jeffrey Bulanadi Profile Picture

Jeffrey Bulanadi 2,304

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans