- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2019 07:06 AM
Hi ppl,
I just wanted to display only the Text mentioned in the worknotes from @ activity stream notifications preview . So I had used the journal entry of worknotes in the mail script "ng_activity_mention_body"
script :
if (current.field_name == "work_notes") {
template.print(recordGR.work_notes.getJournalEntry(1) + "<br />");
}
and got the below result.
But here I tried of splitting the content of worknotes through the code in ng_activity_mention_body :
var work_notes = recordGR.work_notes.getJournalEntry(1);
var regex= new RegExp('\n'); // searching for the first line break
var work_notes2=work_notes;
var i = work_notes.search(regex);
if (i>0)
{
// taking everything after the first line break, he-he.
work_notes2 = work_notes.substring(i+2, work_notes.length);
template.print("COMMENTS: " + "</br/>" + work_notes2 + "<br />");
and result is:
So here I dont want to display the user name, but I am unable to find how to not get this @user and split the worknotes and get only the text i.e comments: text
Would be helpful if this gets answered.
Thanks in advance.
Snow_novice.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2019 02:36 AM
Hi ppl,
Got the solution for this issue.
You will get the output as :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2019 02:36 AM
Hi ppl,
Got the solution for this issue.
You will get the output as :