Fix for Issue with deleting Assets

Fix for Issue with deleting Assets

Upon on deleting assets, if you get the below error:



Verify if you can see the below trace in logs:

[11:23:12:374]|[13-10-2021]|[com.adventnet.servicedesk.asset.util.AssetUtil]|[SEVERE]|[83]: Exception while updating Workstation with id : 7106| 
com.adventnet.persistence.DataAccessException: Exception occured while executing SQL to delete rows

Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The DELETE statement conflicted with the REFERENCE constraint "CIType_5409_FK". The conflict occurred in database "servicedesk", table "dbo.CIType_5409", column 'CIID'.

If yes, follow the below mentioned:

1. Go to Reports > New Query Reports and execute the below query:
select * from citype where tablename='CIType_5409'

2. Then go to Admin > Configuration Item Types and check the details of the CI type which was displayed upon executing the above query. 

3. Now create a new CI type with the same properties like this one, that is, it should be a replica of this CI type (Only the name of the newly created CI type should be different). 

4. Now try performing the delete operation.