Oh my god. It's full of code!

Random Quick Tip

Hey,
For anyone attempting to write Salesforce Apex code and needs to know how to manually insert a line break into a textarea field, just enter \r\n in the text string. For example

contact.notes__c = “This is some text \r\n This text will be on the next line!”

I remember when I wanted to do that it took me a while to figure out, so I figured I’d post it.

PS I think this technique works in regular text areas on any website as well. Gotta test that out.

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