How MS CRM identify new line in data

no-newline

one of requirement we had from client is add </br> for new line for “Description”, when we forward that data to another application from SOAP call.

But problem was, we cannot put that </br> in CRM field because its not looks good and many time user copy – pest data from some other document that time also we can not ask user to add ‘BR’  tag on each new line and even its not feasible. 

When we read data with SDK, it shows exact description but there no new line identifier.

Hence, I started analysis for this, even I was eager to know that how CRM identify that this is a new line.

After an hour, I learned that, CRM puts ‘/n’ when we press ‘Enter’ button and for copy – pest he puts ‘/r’ for new line.

After this my job was easy i just used string.Repalce(“/n”, “</br>”).Replace(“/r”, “</br>”) .

Thanks.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s