Quantcast
Channel: Microsoft Dynamics CRM
Viewing all articles
Browse latest Browse all 71679

Forum Post: getValue() on multi-line text field strips newlines

$
0
0
I am running JavaScript that needs the value of a multi-line field verbatim, but when I fetch the value using getValue() I get a string with all lines concatenated to each other without separators. Example: MyField value: First line Second line But when in the form I run the JS code below: var text = Xrm.Page.getAttribute('new_myfield').getValue(); the value of text is ' First lineSecond line ' I really need the original, i.e. something like ' First line\nSecond line ' or ' First line\r\nSecond line ' or even ' First line Second line '. This seems such a basic requirement that I think I am doing something wrong, in which case sorry for asking a dumb question, but I would appreciate if someone could point me to a working solution.

Viewing all articles
Browse latest Browse all 71679

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>