Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Line breaks in labels in Dyn365FO

Posted on by Microsoft Employee

Dear Sir/Madam,

It seems labels of new Dynamics AX cannot contain line breaks, even though we implement as instructed in http://axdaily.blogspot.jp/2010/04/labels-with-line-breaks.html

("\n" and "\r\n" do not work)

Appreciated if anyone tell us how to actualize it.

Best regards,

Mitsu

*This post is locked for comments

  • Francesco Profile Picture
    Francesco 520 on at
    RE: Line breaks in labels of new Dynamics AX

    Hi Mitsu,

    You can solve this in two slightly different ways:

    1. Create a label like @CUS101 = "Line1%1Line2". Then call it like strfmt("@CUS101", num2char(10));

    2. Create a label like @CUS102 = "Line/nLine2". Then call it like strfmtLB("@CUS102");

    The latter function strfmtLB is specifically intended for multiline. The first solution allows for some extra flexibility, which is most always good :)

    One way or the other you'll have to format your label before printing it.

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Line breaks in labels of new Dynamics AX

    Hi Mitsugu,

    I got the following answer about this problem from Microsoft Support Team.

    "We do not support formatted text in the Dynamics 365 for Operation product offering. As html in plain text is considered a security threat."

    Therefore, This is a product restriction.

    I sent them improvement request about this.

    Regards,

    Yuki

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Line breaks in labels of new Dynamics AX

    Hi StephanieR,

    Thank you for your response. I am afraid I could not find the info about line breaks in your link. Could you point out where we can find it in the link?

    Regards,

    Mitsu

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Line breaks in labels of new Dynamics AX

    Hi Vilmos and Kavitha,

    Thank you for your response. We tried both strFmtLB() and <br/>, but could not actualize line breaks.

    Appreciated if you could suggest other ways.

    Regards,

    Mitsu

  • Suggested answer
    Vilmos Kintera Profile Picture
    Vilmos Kintera 46,149 on at
    RE: Line breaks in labels of new Dynamics AX

    If you check the link which you have pasted, it clearly states that labels by standard will not work using line break markers.

    You had to use a specific functionality of strFmtLB() in the Global collection class in order to format it like that.

    Did you try to use the same function for the label for which you want line breaks in AX7?

    If yes and it did not work, maybe you could try to put in <br/> tag instead of \n to maybe try to force it as HTML? I have not tried this way, but may be worth a shot. If AX renders it as text, you might have to check the source of the web page in order to insert the correct sequence of characters to close previous sections and interpret it as an actual line break.

  • Suggested answer
    Pravasti AK Profile Picture
    Pravasti AK 2,985 on at
    RE: Line breaks in labels of new Dynamics AX

    Hi Mitsugu,

    info(strFmtLB(strFmt("@SYS39890", "Line1", "Line2")));

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Line breaks in labels of new Dynamics AX

    Can you check the link about Microsoft Dynamics AX, may be helpful

    www.gatewaytechnolabs.com/.../ms-dynamics-ax

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Line breaks in labels of new Dynamics AX

    Hi Kavitha,

    Thank you for your quick answer, but the contents of this link is just the same as my link.

    Best regards,

    Mitsu

  • Suggested answer
    Pravasti AK Profile Picture
    Pravasti AK 2,985 on at
    RE: Line breaks in labels of new Dynamics AX

    Hi Mitsugu,

     Please follow the below link as i think it may help,

    https://community.dynamics.com/ax/b/axdaily/archive/2010/04/07/labels-with-line-breaks

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!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans