- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2019 12:42 PM
In my inbound email action, I am trying to populate the short description of the incident with email subject and a line from the email body.
Say the email body contains the line "Test:123" and the email subject is "Email Subject". I would like to append both "Test:" value and entire email subject both separated by a comma. How do I achieve this in an inbound email script?
Finally, a short description should look like
123, Email Subject
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2019 12:54 PM
Hi Nitish,
You can try using below lines
var bodytxt=email.body.test; //stores value 123 from the mail body
current.short_description=bodytxt+' ,'+email.subject;
Thanks,
Jaspal Singh
Hit Helpful or Correct on the impact of response.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2019 12:55 PM
Hi,
You need to extract this from those body and subject line as:
var bod = email.body; // body text is, Test:123
bod = bod.split(":");
var str = bod[1]; // here you will get 123
var subj = email.subject; //subject text is, Email Subject
var text = str + ',' + ' subj';
//and, set it as
current.short_description = text;
Hope this helps.
Mark helpful or correct based on impact.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2020 08:36 AM
can you please help here :