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.

                  New to ADSelfService Plus?

                    • Related Articles

                    • Unable to modify asset state or unable to edit assets

                      Issue: While trying to change asset state from list view, we get "Sorry an error has occurred". If we try to Edit that asset, we get a blank page. Error traces from logs: |[com.adventnet.servicedesk.asset.action.AssetDefAction]|[SEVERE]|[102]: ...
                    • When will the Assets get duplicated ?

                      Please find the possible scenarios when the machines are renamed with _old Scenario 1: When the workstations are swapped in the network. Consider two workstations, MACHINE-A with service tag ST-1 and MACHINE-B with ST-2. Both the workstations are ...
                    • Asset auto assign fails

                      When trying to auto assign Owner for assets if it shows failed for all assets with screen shot like shown below, As you can see from the above screen shot that the Suggested Owner field is Empty for all assets. In such cases, you can observe the ...
                    • Query to show count of IT assets or count of assets that consumed license (MSSQL & PGSQL)

                      Tested in Build PGSQL (14300) or MSSQL (14306) SELECT count(Resources.RESOURCEID) "Count Of Used Assets" FROM Resources LEFT JOIN ComponentDefinition ON Resources.COMPONENTID=ComponentDefinition.COMPONENTID LEFT JOIN ComponentType ON ...
                    • How to auto-create change request(s) for unplanned changes on Assets

                      This post describes the use of a python script to auto-create change requests for unplanned modifications on Assets using Custom Schedules. This script is applicable only for builds prior to 11138. UseCase: Multiple assets are inventoried in ...