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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

How to insert a line break in user defined comments.

(0) ShareShare
ReportReport
Posted on by 167

Hi ,

I have a string field of length 2k characters. I want that whenever user enters any comments it should display per line as below.

pastedimage1675929816554v1.png

How and where I should define this .

Thanks!!

I have the same question (0)
  • Suggested answer
    GirishS Profile Picture
    27,833 Moderator on at

    Hi D365 ER,

    I think its up to the user only. We cannot add the line break via code after the user enter the value.

    For the control to have multi line you can set the "MultiLine" property to yes on the controls and check.

    Mostly for the comment like fields - EDT referring to the comment fields will have display height property to some whole number value.

    You can refer to the timesheet comment field.

    Thanks,

    Girish S.

  • D365 ER Profile Picture
    167 on at

    Thanks Girish, Can we not set up display method on form field like this:

    public display str Comments()

    {

    str     comment;    

         comment += comment\n;

         return comment;    

    }

  • GirishS Profile Picture
    27,833 Moderator on at

    Yes, you can create display method and add line break. But I think in table it will be saved in single line only.

    From where you will find out this belongs to 1st line and 2nd line in single line of text.

    You can try the above suggestion and if it works it will be great.

    Thanks,

    Girish S.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 512 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 386

#3
Adis Profile Picture

Adis 259 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans