- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-02-2018 07:45 PM
Hi,
There is an inbound email action which creates Incidents with a priority as Medium. Now I am planning to write a business rule which will find a string in description and if that string in found set the priority to High. Business rule will be having attributes as Insert and Before.
Just wondering what will be value of Incident after I write this business rule?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-02-2018 09:55 PM
i believe yes, it will be overridden by the business rule. Inbound email action is just trying to insert the new record but it's not defining when that action has to be performed, but before insert BR will trigger just before inserting the new record in database.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-02-2018 09:13 PM
hello srini,
You may try this one.
inbound action:
current.short_description =email.subject;
current.incident_state = IncidentState.NEW;
current.priority = 3;
current.insert();
Business Rule:
var inc = new GlideRecord("incident");
inc.initialize();
if(current.short_description == email.subject){
inc.urgency = '1'; // high
inc.impact = '1'; // high}
inc.update();
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-02-2018 09:18 PM
I think I failed to explain in detail. As you mentioned above, I have both Inbound Email Action and a business rule for setting Priority. What will be the priority of the Incident when I am setting it from both (Inbound Email Action and Business Rule)? Will system override Priority set by Inbound Email Action with Business Rule?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-02-2018 09:55 PM
i believe yes, it will be overridden by the business rule. Inbound email action is just trying to insert the new record but it's not defining when that action has to be performed, but before insert BR will trigger just before inserting the new record in database.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-02-2018 10:25 PM
Yes, you are right. I just tested it.