SDL WorldServer - when trying to delete a Cost Model, I receive the error 'Not all of the Cost Models were deleted. The following objects still have dependencies."
000014142|11/25/2020 10:26 PM
I cannot delete one or more Cost Models, The message displayed is:
Not all of the Cost Models were deleted. The following objects still have dependencies.
Please verify that:
The Cost Model is no longer used in any Project Type.
The Cost Model is no longer used in any or active or completed or canceled projects. To check this, enable the Cost Model column in your All active projects and All completed and canceled projects View and search for the Cost Model's name. If you find that it is associated with a project, remove the association through Change Attributes.
Sometimes it is not obvious to find out which projects prevent the Cost Model to be deleted. In that case, running this query in the Database will show the dependencies with projects:
select * from Projects where costModelId=xxxx
Note: The COSTMODELID can be found by clicking on the Cost Model name and check the URL. For instance:
So assuming that the Cost Model ID is 2377, the query would be:
select * from Projects where costModelId=2377
The result of the query will display the active or completed/canceled projects associated with the Cost Model you would like to delete. If the Cost Model is associated with an active project, you can remove it via Change Attribute. However, if it is associated with a Completed or Canceled project that has not been archived yet, you will need to wait for the Project Cleaner to archive the project before you will be able to delete the Cost Model.