- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2018 09:35 AM
Create a business rule 'Remove Temp Incident Rule' , This should execute only whenever any record removed from 'Incident' table.
- Query the incident number from 'incident_temp' table based on removed Incident Number record from 'Incident' table
- Remove the corresponding incident record from 'Incident_temp' table
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2018 11:33 AM
Advanced checkbox should be checked.
When to Run - before and delete checkbox should be checked.
Code will be this -
var gr = new GlideRecord('incident_temp');
gr.addQuery('field_name', current.number);
gr.query();
if(gr.next()) {
gr.deleteRecord();
}
For Full Detail of Business Rules go through the below link -

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2018 10:46 AM
Write Before Delete BR and in the script glide the incident of 'incident_temp' then delete the record from incident_temp table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2018 11:15 AM
can u give the details explaination bro

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2018 11:33 AM
Advanced checkbox should be checked.
When to Run - before and delete checkbox should be checked.
Code will be this -
var gr = new GlideRecord('incident_temp');
gr.addQuery('field_name', current.number);
gr.query();
if(gr.next()) {
gr.deleteRecord();
}
For Full Detail of Business Rules go through the below link -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2018 11:37 AM
thank you