I have several multi-line text fields in an entity in CRM 4. When I load the value from one into a multi-line Windows.Forms.Textbox in C# through the SDK using something like
this.textBox.Text = myOpportunity.new_detail.ToString();
the newline characters aren't transferred properly. They show up as small squares in my C# form field.
How can I convert these properly in both directions (Fetch and Update)?
I suspect they're coming through as just line feed (\\n) instead of carriage return line feed (\\r\\n).
You can probably just do a simple replace:
this.textBox.Text = myOpportunity.new_detail.ToString().Replace("\n", "\r\n");
and then the reverse in the opposite direction.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.