Business Rule: Create Incident based on Time and status
On Custom table.
var gr = new GlideRecord('incident');
gr.initialize();
gr.caller_id = gs.getUserName();
gr.short_description = 'Light is on the floor';
gr.assignment_group = "5f6441efc0a8010e0177fcb589156352";
gr.assigned_to = "63b4c2cd0bb23200ecfd818393673a95";
gr.impact= "1";
gr.urgency= "2";
gr.insert();
Business Rule: Send mail on incident creation
gs.eventQueue('incident.commented', current, gs.getUserID(), gs.getUserName());
Email Notification: CreateAThonNOtification fired based on event
Template:
EmailTemplate
Subject:
Light is on the Floor Incident No ${current.number}
Body:
<p> </p>
<table style="width: 100%; border-top: 1px solid #909090; border-bottom: 1px solid#909090;">
<tbody>
<tr style="font-family: Calibri; background-color: #239604; width: 100%; color: #ffffff; text-align: center; font-size: 24px;">
<td><strong>Light-On Notifiation</strong></td>
</tr>
</tbody>
</table>
<p>Hi,</p>
<p style="font-family: Calibri; color: black;">You have been assigned the following incident to turn off the light.<br />Please check below the details</p>
<p> </p>
<table style="width: 60%; background-color: #ccf3f1;">
<tbody>
<tr>
<td style="font-family: Calibri; color: #0c090a; font-weight: bold;">Incident Number :</td>
<td style="font-family: Calibri;" colspan="4">${URI_REF}</td>
</tr>
<tr>
<td style="font-family: Calibri; color: #0c090a; font-weight: bold;">Short Description :</td>
<td style="font-family: Calibri;" colspan="4">${current.short_description}</td>
</tr>
</tbody>
</table>
<p>This is system generated mail please do not reply on this.</p>
<p> </p>
No comments:
Post a Comment