For incoming emails - how do you set the target?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-17-2017 10:41 AM
I am not using a watermark to update an incoming email - I'm actually going through a glide query and updating it that way.
Because of this, the target is empty (even though the email is updating the record). This causes all the attachments on the email to NOT get copied over to the record.
How do I set the current email target to the glide query record?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-17-2017 10:45 AM
Hello Eric,
Target is a document id field and it needs to be set differently
Sample script : Adjust it as per your need
var gr = new GlideRecord('sys_email');
gr.get('81404e364fc0a200bbc32d118110c75c'); //queries one record from email log
gr.instance = 'b3d7a9b64f7b1200bbc32d118110c741'; //sys_id of incident
gr.table = 'incident'; //table name of incident
gr.update();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-17-2017 10:48 AM
Hi,
Are you saying I'd include that in the inbound action itself to go back to the email record and set that field? Would that occur in time for the attachments to move over to that record? Or would it simply set the field at the attachments would not be moved?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-17-2017 10:52 AM
Hello Eric,
As the watermark is not being used, I think you have to manually set the field on email log table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-17-2017 10:56 AM
I wonder - is it possible to, instead of define a new glide record object, just do var current = new GlideRecord('....') and reuse the name the same way? That way current would be the object instead of having to create a new one?