<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Business rule on sys_email table in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/business-rule-on-sys-email-table/m-p/2616616#M1017532</link>
    <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to use the event name in the business rule condition (created on sys_email table ). I'm not sure how to determine or rather dot walk the event name. Can some one please guide&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohnnySnow_0-1689675246711.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/274151iFDAF363A75DF1ACF/image-size/medium?v=v2&amp;amp;px=400" alt="JohnnySnow_0-1689675246711.png" title="JohnnySnow_0-1689675246711.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jul 2023 10:25:45 GMT</pubDate>
    <dc:creator>JohnnySnow</dc:creator>
    <dc:date>2023-07-18T10:25:45Z</dc:date>
    <item>
      <title>Business rule on sys_email table</title>
      <link>https://www.servicenow.com/community/developer-forum/business-rule-on-sys-email-table/m-p/2616616#M1017532</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to use the event name in the business rule condition (created on sys_email table ). I'm not sure how to determine or rather dot walk the event name. Can some one please guide&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohnnySnow_0-1689675246711.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/274151iFDAF363A75DF1ACF/image-size/medium?v=v2&amp;amp;px=400" alt="JohnnySnow_0-1689675246711.png" title="JohnnySnow_0-1689675246711.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 10:25:45 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/business-rule-on-sys-email-table/m-p/2616616#M1017532</guid>
      <dc:creator>JohnnySnow</dc:creator>
      <dc:date>2023-07-18T10:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: Business rule on sys_email table</title>
      <link>https://www.servicenow.com/community/developer-forum/business-rule-on-sys-email-table/m-p/2616622#M1017533</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/168482"&gt;@JohnnySnow&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P class="shortdesc"&gt;&lt;SPAN class="ph"&gt;Events are special records that the system uses to log when certain conditions occur and to take some kind of action in response to the conditions.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p"&gt;The system uses business rules to monitor for system conditions and to generate event records in the Event [sysevent] table, which is also known as the event log or event queue.&lt;/P&gt;
&lt;P class="p"&gt;Event-generating business rules typically use this script logic:&lt;/P&gt;
&lt;P class="p"&gt;If [some condition is true for the current record], then [add a specific event to the queue].&lt;/P&gt;
&lt;DIV class="p"&gt;For example, here are some of the conditions in the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="ph uicontrol"&gt;incident event&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;business rule:
&lt;UL id="events__ul_xnm_jwg_vw" class="ul"&gt;
&lt;LI class="li"&gt;If a user adds a comment to an incident record, add an&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="keyword parmname"&gt;incident.commented&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;event.&lt;/LI&gt;
&lt;LI class="li"&gt;If a user adds an incident record, add an&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="keyword parmname"&gt;incident.inserted&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;event.&lt;/LI&gt;
&lt;LI class="li"&gt;If a user updates an incident record, add an&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="keyword parmname"&gt;incident.updated&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;event.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;DIV class="p"&gt;Event-generating business rules use the GlideSystem&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="keyword apiname"&gt;eventQueue&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;method to insert event records, which typically contain this information:
&lt;DIV class="table-wrap"&gt;
&lt;TABLE id="events__table_fjs_st1_vw" class="table frame-all"&gt;&lt;CAPTION&gt;&lt;SPAN class="title"&gt;Event fields&lt;/SPAN&gt;&lt;/CAPTION&gt;&lt;COLGROUP&gt;&lt;COL /&gt;&lt;/COLGROUP&gt;&lt;COLGROUP&gt;&lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD class="thead"&gt;
&lt;TR class="row"&gt;
&lt;TH id="events__table_fjs_st1_vw__entry__1" class="entry colsep-1 rowsep-1"&gt;Field&lt;/TH&gt;
&lt;TH id="events__table_fjs_st1_vw__entry__2" class="entry colsep-1 rowsep-1"&gt;Description&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY class="tbody"&gt;
&lt;TR class="row"&gt;
&lt;TD class="entry colsep-1 rowsep-1"&gt;Name&lt;/TD&gt;
&lt;TD class="entry colsep-1 rowsep-1"&gt;Unique name of event. Baseline event names include the record affected and the triggering action, such as&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="keyword parmname"&gt;incident.commented&lt;/SPAN&gt;.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR class="row"&gt;
&lt;TD class="entry colsep-1 rowsep-1"&gt;Parm1&lt;/TD&gt;
&lt;TD class="entry colsep-1 rowsep-1"&gt;Event-specific parameter the system uses to pass record information to other parts of the system, such as a record Sys ID or a field value.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR class="row"&gt;
&lt;TD class="entry colsep-1 rowsep-1"&gt;Parm2&lt;/TD&gt;
&lt;TD class="entry colsep-1 rowsep-1"&gt;Event-specific parameter the system uses to pass record information to other parts of the system, such as a record Sys ID or a field value.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR class="row"&gt;
&lt;TD class="entry colsep-1 rowsep-1"&gt;Table&lt;/TD&gt;
&lt;TD class="entry colsep-1 rowsep-1"&gt;Table to which the event applies. This is the same table on which the business rule ran.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR class="row"&gt;
&lt;TD class="entry colsep-1 rowsep-1"&gt;Instance&lt;/TD&gt;
&lt;TD class="entry colsep-1 rowsep-1"&gt;Sys ID of the record to which this event applies.&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="p"&gt;Scheduled jobs periodically read the event queue and forward them to the appropriate handler for processing. The handler uses information from event records to take some kind of action such as:
&lt;UL id="events__ul_vph_sq1_vw" class="ul"&gt;
&lt;LI class="li"&gt;Run a script action&lt;/LI&gt;
&lt;LI class="li"&gt;Schedule a job&lt;/LI&gt;
&lt;LI class="li"&gt;Send a notification&lt;/LI&gt;
&lt;LI class="li"&gt;Trigger a workflow activity&lt;/LI&gt;
&lt;LI class="li"&gt;Trigger an inactivity monitor&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;P class="p"&gt;By default, the system provides events covering a broad view of application activity. If existing events do not meet your needs, you can create your own events to watch for specific changes to records.&lt;/P&gt;
&lt;P class="p"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 10:23:43 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/business-rule-on-sys-email-table/m-p/2616622#M1017533</guid>
      <dc:creator>Community Alums</dc:creator>
      <dc:date>2023-07-18T10:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: Business rule on sys_email table</title>
      <link>https://www.servicenow.com/community/developer-forum/business-rule-on-sys-email-table/m-p/2616654#M1017542</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/168482"&gt;@JohnnySnow&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;why to create BR on OOB table?&lt;/P&gt;
&lt;P&gt;It's not recommended.&lt;/P&gt;
&lt;P&gt;What's your use case?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 10:56:15 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/business-rule-on-sys-email-table/m-p/2616654#M1017542</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2023-07-18T10:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: Business rule on sys_email table</title>
      <link>https://www.servicenow.com/community/developer-forum/business-rule-on-sys-email-table/m-p/2617263#M1017764</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/265966"&gt;@Ankur Bawiskar&lt;/a&gt;&amp;nbsp;I wanted to attach the pdf to the email notification, I can’t use the include attachments option as there would be other attachments on the hr case which might not be relevant. I’m sending this notification from a common subflow and that doesn’t &amp;nbsp;return the sys id, hence thought of achieving through business rule. Is there other ways to achieve it?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 19:47:06 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/business-rule-on-sys-email-table/m-p/2617263#M1017764</guid>
      <dc:creator>JohnnySnow</dc:creator>
      <dc:date>2023-07-18T19:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: Business rule on sys_email table</title>
      <link>https://www.servicenow.com/community/developer-forum/business-rule-on-sys-email-table/m-p/2617297#M1017783</link>
      <description>&lt;P&gt;The even name which you see there is nothing but email log from table (sys_email_log).&lt;/P&gt;&lt;P&gt;from BR on sys_email table, you can write following script to get event name:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var getEvent = new GlideRecord('sys_email_log');
	getEvent.addQuery('email',current.sys_id);
	getEvent.query();
	if(getEvent.next()){
		gs.addInfoMessage('Event name is '+getEvent.event.getDisplayValue());
	}&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 18 Jul 2023 20:54:30 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/business-rule-on-sys-email-table/m-p/2617297#M1017783</guid>
      <dc:creator>sushantmalsure</dc:creator>
      <dc:date>2023-07-18T20:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: Business rule on sys_email table</title>
      <link>https://www.servicenow.com/community/developer-forum/business-rule-on-sys-email-table/m-p/2617442#M1017834</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/168482"&gt;@JohnnySnow&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;then you can have after insert BR on sys_email table and copy the required file you want to the email record&lt;/P&gt;
&lt;P&gt;what script did you start with and where are you stuck?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 05:12:02 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/business-rule-on-sys-email-table/m-p/2617442#M1017834</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2023-07-19T05:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: Business rule on sys_email table</title>
      <link>https://www.servicenow.com/community/developer-forum/business-rule-on-sys-email-table/m-p/3466154#M1243669</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/265966"&gt;@Ankur Bawiskar&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it not recommended to have before BR on sys_email table? we have a requirement to check the user from sys_email table and query the user table and fetch the user name then map it to user id in the sys_email. we are thinking to acheive it in before insert BR, what's your thought on this one?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jan 2026 12:17:53 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/business-rule-on-sys-email-table/m-p/3466154#M1243669</guid>
      <dc:creator>Mahalakshmi Rav</dc:creator>
      <dc:date>2026-01-13T12:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: Business rule on sys_email table</title>
      <link>https://www.servicenow.com/community/developer-forum/business-rule-on-sys-email-table/m-p/3466181#M1243671</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/165859"&gt;@Mahalakshmi Rav&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please post a new question and share all the details there and tag me as this is an old thread&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jan 2026 12:34:30 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/business-rule-on-sys-email-table/m-p/3466181#M1243671</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2026-01-13T12:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: Business rule on sys_email table</title>
      <link>https://www.servicenow.com/community/developer-forum/business-rule-on-sys-email-table/m-p/3466200#M1243674</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/168482"&gt;@JohnnySnow&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; current.event is the reference to the &lt;STRONG&gt;Event table (sysevent)&lt;/STRONG&gt;.&lt;BR /&gt;&amp;nbsp; current.event.name fetches the actual event name.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Instead of creating a BR on sys_email, use one of these:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Event Script&lt;/STRONG&gt; – Triggered when a specific event fires.&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Script Action&lt;/STRONG&gt; – Fires when an event occurs; you can check the event name and perform actions.&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (event.name == 'incident.assigned') {}&lt;BR /&gt;&lt;BR /&gt;If this response proves useful, please mark it as Accept as Solution and Helpful. Doing so benefits both the community and me. &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jan 2026 12:53:24 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/business-rule-on-sys-email-table/m-p/3466200#M1243674</guid>
      <dc:creator>Prathmeshda</dc:creator>
      <dc:date>2026-01-13T12:53:24Z</dc:date>
    </item>
  </channel>
</rss>

