- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2024 04:36 PM - edited 03-05-2024 06:21 AM
Hello,
We are running into an issue with a business rule is running but not stopping processing of a ui action.
The before business rule runs when inc category is Broadcast Transmission and assigned group is BCC and state changes. The advanced condition is
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2024 04:43 PM
I think the solution would be to add this script to the UI action too, so that impacted countries are associated before a problem record is associated.
var gr = new GlideRecord("u_m2m_core_country_incident");
gr.addQuery("u_incident", current.sys_id);
gr.query();
if (!gr.next()) {
gs.addErrorMessage("Please attach all impacted countries to the incident form before updating the incident state");
}
else
{
var item = current.cmdb_ci;
if (JSUtil.notNil(item)) {
var prob = new IncidentUtils().getProblemFromIncident(current);
if (prob != undefined) {
current.problem_id = prob.insert();
if (current.state != IncidentState.RESOLVED) {
current.state = IncidentState.ON_HOLD;
if (current.isValidField("hold_reason"))
current.hold_reason = IncidentState.AWAITING_PROBLEM;
}
if (GlidePluginManager.isActive("com.snc.best_practice.problem.madrid")) {
var problemV2Util = new ProblemV2Util();
problemV2Util.copyAttachments(current, prob);
problemV2Util.copyAttachedKnowledge(current, prob);
}
current.update();
gs.addInfoMessage(gs.getMessage("Problem {0} created", prob.number));
action.setRedirectURL(prob);
action.setReturnURL(current);
} else {
action.setRedirectURL(current);
}
} else {
action.setRedirectURL(current);
gs.addErrorMessage('CI field is required before creating a problem record');
}
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2024 07:11 PM
Hello,
The issue is the problem record is created and associated with the incident but then is lost due to filling out the impacted countries.
Thanks,
Chad

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2024 05:03 AM
"but then is lost due to filling out the impacted countries." - How is this done? By the user? Is this custom related table linked to the incident or the problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2024 06:28 AM
Hello,
I attached screenshots. So when creating a problem from incident the br requires that the countries be attached and then the user clicks edit and adds a country and thats when the problem that was created is now gone. Thanks, Chad