Skip to main content

Notifications

Announcements

No record found.

Commerce forum
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/.../

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,696 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,490 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans