- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2022 09:00 PM
I need to create an inbound email action so that it creates a record in change request table.
Subject - short description of change request.
Body - Description.
Attachments in email - attachments in change request.
Please guide me how to achieve this.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2022 02:34 AM
it should not be twice
small update
GlideSysAttachment.copy('sys_email',sys_email.sys_id,'change_request',current.sys_id);
OR
current.insert();
GlideSysAttachment.copy('sys_email',sys_email.sys_id,'change_request',current.sys_id);
current.update();
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2022 11:50 PM
If this email inbound action has to execute if the email is coming from 'bharath123@gmail.com'.
How do I put this condition AND
If the attachments are coming from email then those attachments has to be in the change request record's attachments.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2022 12:13 AM
Hi,
in inbound action use this; it would run only when it comes bharath123@gmail.com
if(email.origemail.indexOf('bharath123@gmail.com') != -1){
// your logic here
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2022 12:15 AM
Okay.
Can you please answer this.
If the attachments are coming from email then those attachments has to be in the change request record's attachments.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2022 12:48 AM
should happen directly
if not then use this script
GlideSysAttachment.copy('sys_email',current.sys_id,'change_request',current.sys_id);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2022 01:11 AM