Skip to main content

Notifications

Supply chain | Supply Chain Management, Commerce
Suggested answer

Linefeed in infobox

Posted on by 10

Developing on D365FO

I'm trying to make a line feed in a infobox, but it won't work, in many forums people say that \n will do the job.

Example

public static void main(Args _args)
{
str infostr = 'FirstLine\nSecondLine';

Box::info(infostr);

}

This returns "FirstLine SecondLine" the \n is converted to a space

:

  • Suggested answer
    blujay712 Profile Picture
    blujay712 40 on at
    RE: Linefeed in infobox

    Have you tried the AX2012 solution for infolog line feed?

    This will list each output on a separate line within the infolog

         info(strFmt('Journal number: %1',ljt.JournalNum));
         info(strFmt('Account type: %1',ljt.AccountType));
         info(strFmt('Payment status: %1',ljt.PaymentStatus));
         info(strFmt('Class Id: %1',vpmt.ClassId));
         info(strFmt('Class Id: %1',vpf.bankFormat));                                    

    pastedimage1616522146168v2.png

  • ToddB Profile Picture
    ToddB on at
    RE: Linefeed in infobox

    Hi Carsten,

    In taking a look into this I found the below which states "Dynamics AX development team mentions that this is the limitation of D365FO due to security reason."

    Line break does not work in message box in D365FO

    experience.dynamics.com/.../

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!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

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

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans