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 :
Finance | Project Operations, Human Resources, ...
Answered

How to force LF (not CRLF) as line break in XML file export in Electronic Reporting (ER)?

(2) ShareShare
ReportReport
Posted on by 18

Dear community,

I'm working in Dynamics 365 Finance and Operations and currently using Electronic Reporting (ER) to generate an XML credit transfer file based on the ISO 20022 pain.001.001.09 format. 

However, I’ve noticed that the generated XML file uses CRLF (Carriage Return + Line Feed) as the line breaker per default, which is not accepted by some receiving banks. They require the file to use only LF (Line Feed) line endings.

Please see the screenshot below it shows the XML output where every line ends with CRLF instead of LF.Is there a way to configure the ER format in D365FO so that the generated XML file uses only LF line breaks, without any external post-processing (e.g. X++ stream manipulation, Power Automate, or scripts)? 

I'm looking for a pure ER solution, ideally by changing the output settings or applying transformation inside the ER format definition.

Any suggestions or workarounds are highly appreciated! 🙏 

Thanks in advance,

Klara

 

 

Categories:
I have the same question (0)
  • Verified answer
    Alireza Eshaghzadeh Profile Picture
    14,610 Super User 2025 Season 2 on at
    How to force LF (not CRLF) as line break in XML file export in Electronic Reporting (ER)?
    Hi,

    ased on my investigation, CRLF (showing end-of-line characters) should not pose an issue for the pain.001 files sent to the bank. While some banks return pain.002 and camt files without pretty print formatting (when viewed in Notepad), there is no functional difference in the XML structure. As long as the files are sent in valid XML format, the bank will parse them based on the XML elements, not line breaks or formatting.

     

    I have not identified any better solution in Electronic Reporting (ER) than the one suggested by Adis—evaluating the use of a transformation rule. However, it is important to test whether the transformation works as expected in plain text (e.g., Notepad), since the XML view may appear correct even if formatting differs.

  • Suggested answer
    Anton Venter Profile Picture
    20,219 Super User 2025 Season 2 on at
    How to force LF (not CRLF) as line break in XML file export in Electronic Reporting (ER)?
    Hi,
     
    This can't be done in ER only. So this will require some post processing of the file. This is because the Windows operating system uses the CR LF characters to terminate lines in files. The operating systems used by the banks and others (not Windows) use the LF character.
     
     
    Source:
     
     
     
     
     
     
  • Verified answer
    Adis Profile Picture
    5,449 Super User 2025 Season 2 on at
    How to force LF (not CRLF) as line break in XML file export in Electronic Reporting (ER)?
    Hi,
     
    There are some options here, but nothing that is related to the line break.
     
    Are you sure its related to the line break? I also had an issue but that was related to the BOM characters.
     
     
     
     

    Kind regards, Adis

     

    If this helped, please mark it as "Verified" for others facing the same issue

    Keep in mind that it is possible to mark more than one answer as verified

     
     
     
     

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Sohaib Cheema Profile Picture

Sohaib Cheema 785 User Group Leader

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 626 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 621 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans