Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
How can I delete a state which is no longer needed nor is it used. All references to i have been deleted.
Here is what I've tried in CLI:
im deletestate --hostname=mks state_name
Deleting state...
Submitting...
Delete state state_name? [yn](n): y
State "state_name" cannot be deleted because it is still being referenced and a database constraint will not allow it to be deleted. If Items have been created that reference this State, you will not be able to delete this State until you deleted those Items. If this state is referenced by admin objects, you can find where it is being referenced by viewing the State and selecting the Refences tab.
The References tab display no references.
When I try to view references view CLI:
im viewstate --hostname=mks --showreferences state_name
-------------------------
Created by user_name (user_name) on Jul 19, 2004 1:02:41 PM
Modified by user_name (user_name) on Jun 4, 2014 8:12:00 AM
State: state_name
Description:
Blah Blah
Image: none
Position: 120
Capabilities: none
References:
-------------------------
Solved! Go to Solution.
You would need to query for them using the History (by value) condition.
Hi Dan,
The error message does indicate that if there are historical references (in item history) then you have to delete those items before you can delete the state. This is often the case if it complains about references but the References tab or --showreferences flag return no results.
How would I be able to find those historical references?
You would need to query for them using the History (by value) condition.
I found them. Thank you!