-
Admin needs to preserve carriage returns in transfer of text fields in Salesforce
Hello developers,
I am working on an apex script to do a one time transfer of data from one object to another. One of the fields that has to be transferred is a large text area field. It will be transferred to a Rich text area field. I can't figure out how to preserve the carriage returns. Below is the simple version of my script that I have been using to try different things out. I know not to to put dmil inside of loops....again this is just a quick to find how to transfer the string. Without really understanding these different escape methods...I tried all of them...escapeEMCAScript, unescapeECMAScript, escapeHTML3 etc. But none of them work. Everything results in the string saved to the field without any returns.for(Project__c mp : [select Id, Brief__c, Opportunity__r.Description from Project__c
where Id = 'a10N0000001hF0WIAU'])
{
mp.Brief__c = mp.Opportunity__r.Description.escapeHtml4();
update mp;
}
Log In to reply.
Popular Salesforce Blogs
The Complete Guide to Salesforce CRM Integration
Salesforce is considered one of the most essential information platforms that have revamped the business space since the onset of the information era. As a…
Welcome to Our Salesforce CPQ Video Series!
Video 1: Intro to Managing Your Subscription Products with Salesforce CPQ: Salesforce CPQ is a great tool for managing complex sales quoting processes and creating professional output documents.…
Protect your Data with Data Classification in Salesforce
Happy Cybersecurity Awareness Month (CSAM)! Did you know that the loss of critical, and often sensitive, information can severely impact the profitability and innovation of your…
Popular Salesforce Videos
Deleting Contacts in Salesforce Marketing Cloud
Delete contacts to remove contact information from your Marketing Cloud Contact Builder account. Delete contact information to meet data compliance regulations. In this episode, Eliot…
Introduction to Salesforce Nonprofit Cloud for Program Management
Each nonprofit’s mission and the program is unique, but with Salesforce’s highly configurable and customizable platform, you can manage your entire program from one central…
Salesforce Admin Tutorial for Beginners 2022
Complete Salesforce Admin Tutorial 00:00:00 Salesforce - Introduction 00:01:27 Salesforce - Types of Services 00:02:21 Salesforce - Cloud Services 00:07:51 Salesforce - Developer Account 00:16:09…