Problem Record - assigned to their own team .

nameisnani
Mega Sage

Hi Team , 

 

We have request that , whenever any end user creating new problem request their assigning to their own team .

 

When they are saving the form , I need to throw an error message stating , Please assign the problem request to ' Problem manger group ' and that to assign Problem Manager group .

nameisnani_0-1724381123779.png

 

Can any one please provide me to achieve this requirement .

 

Please provide me configuration screenshots for better understanding .

 

1 ACCEPTED SOLUTION

Satishkumar B
Giga Sage
Giga Sage

@nameisnani  Can you try writing a before-Insert Business rule on your problem table with below script. 

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

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

 

please mark my response as helpful 👍and accepted solution if it helps

View solution in original post

1 REPLY 1

Satishkumar B
Giga Sage
Giga Sage

@nameisnani  Can you try writing a before-Insert Business rule on your problem table with below script. 

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

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

 

please mark my response as helpful 👍and accepted solution if it helps