- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2017 06:06 AM
Hi All,
I used this below code for adding note in comment field but "\n" is not giving new line in comment field.
Please let me know any issue in this script
var comments_ritm = " This case has been created from "+number;
var comments = current.comments.getJournalEntry(-1);
ca.comments = comments_ritm+"\n\n"+comments;
Thanks,
Neethu
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2017 01:12 AM
The issue got fixed by using following script
var number= gs.getMessage(["[code]<a href =sc_req_item.do?sys_id="+ current.sys_id +">"+ current.number +"</a><p>[code]"]);
var comments_ritm = " This case has been created from "+number;
var comments = current.comments.getHTMLValue();
ca.comments = comments_ritm+comments;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2017 06:20 AM
Try this:
var comments_ritm = " This case has been created from "+number;
var comments = current.comments.getJournalEntry(-1);
ca.comments = comments_ritm+ "\n comments";
-Syed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2017 06:28 AM
This is comming as like below
This case has been created from RITM comments
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2017 06:23 AM
var number= gs.getMessage(["[code]<a href =sc_req_item.do?sys_id="+ current.sys_id +">"+ current.number +"</a>[code]"]);
var comments_ritm = " This case has been created from "+number;
var comments = current.comments.getJournalEntry(-1);
ca.comments = comments_ritm+"\n\n"+comments;
may issue with number? i tried adding \n in number also.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2017 06:32 AM
Does it work if you use a "simple number" like the following?
var number= current.getValue('number');
var comments_ritm = " This case has been created from "+number;
var comments = current.comments.getJournalEntry(-1);
ca.comments = comments_ritm+"\n\n"+comments;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2017 11:41 PM
Yes,that time it is working
This case has been created from RITM000001
2017-07-20 23:36:19 - Neethu (Customer Visible Notes(comments)) efewr
2017-07-20 23:36:23 - Neethu (Customer Visible Notes(comments)) weew