Problem tickets cannot be created from within an incident context menu

nameisnani
Mega Sage

Hi Team ,

 

can anyone please help me on this issue .

 

From within an incident - Create Problem does not working - Refer attached

 

nameisnani_0-1750920666985.png

 

 

why this is happening , could anyone please help me on this . 

 

Thanks

1 ACCEPTED SOLUTION

@nameisnani 

you are aborting the insert/update if group is not your group sysId

When problem is created via that button from Incident at that time of insertion assignment group is empty and the IF condition will match.

Update your BR script as this so that it checks if group is not empty

(function executeRule(current, previous /*null when async*/ ) {
    // Replace 'Problem Manager Group' with the sys_id of the actual Problem Manager group
    var problemManagerGroupSysId = '19d892ee873c0d50158285d50cbb356a';

    // Check if the assignment group is not the Problem Manager Group
    if (current.assignment_group != problemManagerGroupSysId && current.assignment_group != '') {
        gs.addErrorMessage('Please note, any problem record should be assigned to Problem_Manager ONLY.');
        current.setAbortAction(true); // Prevent the record from being saved
    }
})(current, previous);

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

20 REPLIES 20

nityabans27
Mega Guru

### 🔹 For “Create Problem” button not working:

**"Please check if the 'Create Problem' UI Action is active, not restricted by conditions or roles, and visible in the current view. Also verify if any UI policies or client scripts are hiding it. Lastly, ensure your role has create access on the Problem table."**

---

### 🔹 For “Problem created: record not found”:

**"The problem record is likely created, but redirection is failing—possibly due to a null or incorrect sys\_id in the script. Check if the insert is returning a valid record and that redirection uses `action.setRedirectURL(prob)`. Also confirm the user has access to view the Problem record."**

 

@nityabans27 @nityabans27 

 

even for admin also same issue .

Hi @nityabans27  @Dr Atul G- LNG 

 

The problem is with BR , 

 

what was the issue in the BR . Please help me 

 

After making Inactive this BR , from the incident context menu , we can able to create prb record . 

 

but we need this BR also

 

nameisnani_0-1750928555370.png

nameisnani_1-1750928645877.png

(function executeRule(current, previous /*null when async*/ ) {
    // Replace 'Problem Manager Group' with the sys_id of the actual Problem Manager group
    var problemManagerGroupSysId = '19d892ee873c0d50158285d50cbb356a';

    // Check if the assignment group is not the Problem Manager Group
    if (current.assignment_group != problemManagerGroupSysId) {
        gs.addErrorMessage('Please note, any problem record should be assigned to Problem_Manager ONLY.');
        current.setAbortAction(true); // Prevent the record from being saved
    }
})(current, previous);

 

 

 

Hello @nameisnani, please try to assign Problem to highlighted group '19d892ee873c0d50158285d50cbb356a' and it should work fine I believe.

Its strange that you'd like to abort the problem creation when its not assigned to a particular group based on sysID.

 

Regards,

Nishant