You need to sign in to do that
Don't have an account?

issue on removing Linebreaks on fields.
I ran my test case using API version 19 and 20.0(or 42.0) and attached the logs and test cases.
I found this thing weird
On 19.0 version I’m running below code
String lastnametest = '\n\r testlastname';
String intmoment = '\n\r testintmoment';
Contact c = new Contact(lastname = lastnametest, Last_Interesting_Moment_Desc__c = intmoment );
Insert c;
Which on printing last name and Last_Interesting_Moment_Desc__c
trimming linebreaks its printing only testlastname and testintmoment.
And I have a trigger on insert to remove line breaks, this might not be useful in this case since next line is trimming.
But on salesforce version 20.0 (or 42.0)
Above statement on print will print a blank line then it will print the values
But on printing this value in trigger the value is only text without line break so it will not remove the line break which I need to achieve.
Attached the test class and trigger and results on running.
Please help thank you
