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 :
Microsoft Dynamics CRM (Archived)

CRM 2015 - Line Breaks in Multi-Line Text field

(0) ShareShare
ReportReport
Posted on by 425

Hi,

We are on CRM 2015 on premise version, the description field on the case entity is a multiline text field, I am storing text with line breaks(clicking the enter takes it to new line), I am wondering how CRM is handing these new lines because i don't see any special characters like(\n) in the DB for this field, it just stores with a space.

For ex:

desc.JPG

Below is how is stored in DB.

Hi, This is a test message for testing multiline text field.  Where are the line breaks stored in Database?   Thanks Jeevan

We have integration with TFS where this description is going as above without line breaks, but the user want it the way it is shown in Case Description.

Any thoughts, much appreciated.

*This post is locked for comments

I have the same question (0)
  • Jeevan Kumar Balija Profile Picture
    425 on at
    RE: CRM 2015 - Line Breaks in Multi-Line Text field

    Hi Aiden,

    Got diverted with other tasks, started looking at it again.

    Yes retrieving the field using SDK in a console application gives me the description with line break characters but if i do the same retrieve in the custom workflow activity or pass it as input parameter, it comes back as plain text without line breaks, strange.

  • Suggested answer
    prt33k Profile Picture
    6,907 on at
    RE: CRM 2015 - Line Breaks in Multi-Line Text field

    Hi Jeevan,

    Line break are represented by CHAR(10), CHAR(13) in SQL. It wont be visible is SELECT statement.

    What you can try is something like this:

    SELECT ,[Description]

     ,REPLACE(Description,char(10),'X')

     FROM [dbo].[Account]

    This will show the exact position of line break.

  • Suggested answer
    Aiden Kaskela Profile Picture
    19,696 on at
    RE: CRM 2015 - Line Breaks in Multi-Line Text field

    Just saw your followup post. You'd have to update your integration to sub out that hidden character with a line break in TFS.

  • Suggested answer
    Aiden Kaskela Profile Picture
    19,696 on at
    RE: CRM 2015 - Line Breaks in Multi-Line Text field

    Hi Jeevan,

    It's using a special character in SQL but I don't know what it is. If you retrieve that record through the SDK and look at that field you'd see:

    "Hi,\nThis is a test"...

    If you want to see what that hidden character is you can look at some posts like these for inspiration:

    www.decisivedata.net/.../how-to-find-a-hidden-unicode-character-using-sql-server

    stackoverflow.com/.../whats-the-best-way-to-identify-hidden-characters-in-the-result-of-a-query-in-sq

    Hope this helps! I'd appreciate if you'd mark this as Answering your question.

    Thanks,

     Aiden

  • Jeevan Kumar Balija Profile Picture
    425 on at
    CRM 2015 - Line Breaks in Multi-Line Text field

    Hi,

    We are on CRM 2015 on premise version, the description field on the case entity is a multiline text field, I am storing text with line breaks(clicking the enter takes it to new line), I am wondering how CRM is handing these new lines because i don't see any special characters like(\n) in the DB for this field, it just stores with a space.

    For ex:

    6170.desc.JPG

    Below is how is stored in DB.

    Hi, This is a test message for testing multiline text field.  Where are the line breaks stored in Database?   Thanks Jeevan

    We have integration with TFS where this description is going as above without line breaks, but the user want it the way it is shown in Case Description.

    Any thoughts, much appreciated.

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#2
Christoph Pock Profile Picture

Christoph Pock 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans