0

I have following Data type Order_Description__c (Long Text Area(32768) ).We are trying to wrap this data type at new line characer.

Input Data:

Long text area as a Order_Description__c field is:

EDIORDER-SAVE COMMENTS C3 Generic LOC 0833 Expected arrival 01/07/2016 OTYPE NE TRKPC 01 GM/00007643020008361321

we tried on this direction :

Reading new line in SFDC using '\r\n' (new line characters)

this.customobj.Order_Description__c
    = EDIORDER-SAVE COMMENTS + ' \r\n' +C3 Generic+' \r\n' + LOC 0833+' \r\n' + Expected arrival 01/07/2016+' \r\n' + OTYPE NE+' \r\n' + TRKPC 01 GM/00007643020008361321;

This method has to work with when using an with an sObject field.

Expected Data : Using \n new line break iterator -- split into exact 6 lines

Like this : EDI ORDER-SAVE COMMENTS

C3 Generic

LOC 0833

Expected arrival 01/07/2016

OTYPE NE

TRKPC 01 GM/00007643020008361321

Any help on it would be much appreciated !

3
  • Please see edited question. there i have updated the tried section with exact data type.
    – Sylphes
    Jul 1, 2016 at 16:28
  • @sfdcfox Please let me know if you need more information on it.
    – Sylphes
    Jul 1, 2016 at 16:42
  • Here Line break as enter
    – Sylphes
    Jul 1, 2016 at 16:54

1 Answer 1

2

Printing of new line character basically depends on the Datatype of the field.

Text Area / Long Text Area use "\r\n"

Rich Text Area use <br/>


Used <apex:outputField in both cases.
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .