- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2024 07:22 AM
we are passing caller_id and caller email id in worknotes of incident. we are getting desired output in single line however if we try to show in next line its throwing error
var work_notes = current.work_notes.getJournalEntry(1);
var callerName = current.caller_id.getDisplayValue() ;
var callerEmail = current.caller_id.email.getDisplayValue() ;
var notes = "Caller Details:\n" +
"Name: " + callerName + "\n" +
"Email ID: " + callerEmail + "\n" +
"Work Notes: " + work_notes;
r.setStringParameter('work_notes', notes);
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2024 07:26 AM
You can try the below script
var work_notes = current.work_notes.getJournalEntry(1);
var callerName = current.caller_id.getDisplayValue();
var callerEmail = current.caller_id.email.getDisplayValue();
var notes = "Caller Details:\n" +
"Name: " + callerName + "\n" +
"Email ID: " + callerEmail + "\n" +
"Work Notes: " + work_notes;
notes = notes.replace(/\n/g, '\\n');
r.setStringParameter('work_notes', notes);
Thanks and Regards
Sai Venkatesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2024 07:26 AM
You can try the below script
var work_notes = current.work_notes.getJournalEntry(1);
var callerName = current.caller_id.getDisplayValue();
var callerEmail = current.caller_id.email.getDisplayValue();
var notes = "Caller Details:\n" +
"Name: " + callerName + "\n" +
"Email ID: " + callerEmail + "\n" +
"Work Notes: " + work_notes;
notes = notes.replace(/\n/g, '\\n');
r.setStringParameter('work_notes', notes);
Thanks and Regards
Sai Venkatesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2024 09:17 PM
Hi @SAI VENKATESH , thanks for the quick reply its working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2024 02:52 AM - edited 05-31-2024 02:53 AM
Hi @SAI VENKATESH ,
when we are trying to use below code for special characters its again coming in same line
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2024 07:27 AM - edited 05-28-2024 07:28 AM
When you populate the work_notes add the data in this tag, it will work then
[code] [/code]
something like below
var work_notes = current.work_notes.getJournalEntry(1);
var callerName = current.caller_id.getDisplayValue() ;
var callerEmail = current.caller_id.email.getDisplayValue() ;
var notes = "[code]Caller Details:\n" +
"Name: " + callerName + "\n" +
"Email ID: " + callerEmail + "\n" +
"Work Notes: " + work_notes + "[/code]";
r.setStringParameter('work_notes', notes);