Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Duplicate Cis Error should be shown as a user understanding

DHANUSHKODv
Tera Contributor

Hi All,

 

When adding  a duplicate CIS in change request form we will get a error like duplicate entry.
So My requirement is user should understand the error shown.

What might be the solution to override this error?

 

 

The system returns error when adding duplicated CIs, but the error is not clear for the user to understand. Error: Unique Key violation detected by database ((conn=244111) Duplicate entry 

1 REPLY 1

Joe Wong
Tera Guru

Hi there,

 

Have you tried creating a before business rule to check for duplication of the CIs.  You can create your BR under cmdb_ci table.  Check for the incoming CI to ensure that it is not in the system already.  If it is, you can throw a user friendly error and prevent the insert to go through.  If the new CI does not exist, allow the insert to happen.

 

Hope this helps.