I am have trouble with line breaks and string literals:
I cannot get the below to compile:
newD.Additional_Information__c = recTypeName + '\r\n\r\n'
+ recTypeName == 'Data Request' ? rq.Reason_for_data_request__c : rq.Reason_for_mailshot__c + ' \r\n'
+ '\r\n\' + 'Pre-Extract Systems Analysis ' + rq.Systems_analysis__c;
what I want is to add a line break into the field but I am getting the error on this line:
+ '\r\n\' + 'Pre-Extract Systems Analysis ' + rq.Systems_analysis__c;
The error is Save error: line breaks not allowed in string literals
What is the correct or best way to include line breaks in strings within my fields?