Extract text from inbound email and post to description field on target record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2019 11:19 AM
Hi All,
I have a requirement to extract data from an inbound email and post to the short description field on the target record.
We have an integration setup using notifications and when the record is initiated on the other system, it will respond in email with that ticket number.
I have attached a sample of the inbound email. I am looking to extract the line: Ticket #xxxxxxxx.
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2019 01:07 AM
I tried the code just as posted and no luck. It didn't update the short description at all.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2019 01:09 AM
Should this code alter?
var ticket = email.subject;
ticket = subject.split("/");
gs.log(ticket[0]);
var sub = current.short_description;
current.short_description = sub + " - " + ticket;
current.update();

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2019 02:02 AM
yes.
you need to use like this
var ticket = email.subject;
ticket = subject.split("/");
gs.log(ticket[0]);
var sub = current.short_description;
current.short_description = sub + " - " + ticket[0];
current.update();
Mark the comment as a correct answer and helpful once worked.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2019 02:51 AM
Hi John,
Let me know if it has worked?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2019 10:52 PM
Hi John,
If my given solution has worked for you, kindly mark the comment as a correct answer and also helpful.