Export a PDF of resolved incident automatically and attach a attachment in email notification.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2022 04:27 AM
Hi All,
Please help me with this below usecase:
Create a incident record, when incident state changes to "Resolved." I need to export that PDF of resolved incident automatically & attach a attachment in Email notification.
Thanks
Sweenal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2022 04:32 AM
Create a business rule to attach the attachment to the current resolved incident.
After then in your notification click on Include Attachments check box.(It will add the attchement to the email with the triggered record).
Sample BR:
(function executeRule(current, previous /*null when async*/ ) {
var rm = new sn_ws.RESTMessageV2();
rm.setHttpMethod('GET');
var url = gs.getProperty("glide.servlet.uri") + current.getTableName() + '.do?PDF&sys_id=' + current.sys_id;
rm.setEndpoint(url);
// Create new properties and save user id and password of an admin account
rm.setBasicAuth('admin', 'your password');
rm.saveResponseBodyAsAttachment(current.getTableName(), current.getUniqueValue(), current.number + ".pdf");
var response = rm.execute();
})(current, previous);
Hope it helps
I used this script in my PDI a long back and it worked fine for me
Thanks
Murthy
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2022 04:44 AM
My whole requirement is :
- Create a incident record, when incident state changes to "Resolved." ,
- Export a PDF of resolved incident automatically & attach a attachment in Email notification.
- Send Notification to the caller with attached attachment of incident record.
So i need to do these two changes can you help with this.
Thanks
Sweenal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2022 07:26 AM
Okie
What have you tried so far?
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2022 10:38 PM
Hi,
This is not working can you please me with this.
Thanks
Sweenal