SecurityIncidentUtils not creating a new security incident

Waru
Tera Contributor

Hi everyone ,

 

im trying to create a security incident from a ui action this is the code

 

var securityIncident = (new SecurityIncidentUtils()).createFromIncident(current);

gs.addInfoMessage(gs.getMessage("Security Incident {0} was created", securityIncident));
action.setRedirectURL(current);

 

it shows a new incident has been created , but if i click on the link or if i go to the security incidents, it won't show anything

 

this are the additional configurations

 

Screenshot 2023-11-07 at 17.43.22.png

 

 thanks a lot

3 REPLIES 3

harshav
Tera Guru

Please update the script

var securityIncident = new SecurityIncidentUtils().createFromIncident(current);

gs.addInfoMessage(gs.getMessage("Security Incident {0} was created", securityIncident));
action.setRedirectURL(current);

Please add the scope at the front, if you are calling it from different scope. If you still don't see it make sure to check the restricted caller access records whether an entry created there are not. 

Waru
Tera Contributor

should the scope be in front of SecurityIncident? scope.Securityincident?

 

yes, also check it is can be accessible form all application scopes or not. if not create a script include in that scope and make it as accessible from all application scopes and call the original script include from your script include and then call your custom script include from the script.