Hello, I am working on a functionality to attach new Dataset on Teamcenter and delete the old one and the problem is that the old Dataset has a reference to a Workflow and this prevents deletion of the Dataset. Via whereReferenced api in the Response I get: { "relation": "Fnd0EPMTarget", "level": 1, "referencer": { "uid": "gznd6IFbnQe0WD", "className": "EPMTask", "type": "EPMTask" } } I tried to remove the reference via Remove Named Reference From Dataset api call but in that case I get the partial error: "message": "Nothing matching the criteria was found to delete.", "code": 214125, "level": 2 This is the request body used for the Remove Named Reference From Dataset: { "header": { "state": {}, "policy": {} }, "body": { "inputs": [ { "clientId": "", "dataset": { "uid": "R1sd5umbnQe0WD" }, "nrInfo": [ { "clientId": "", "type": "EPMTask", "deleteTarget": false } ] } ] } } When I try to DeleteObject in the response I get partial error: "message": "Unable to delete dataset MI-99-000564/01 Miscellaneous. The dataset may be checked out, or referenced, by another business object.", "code": 9043, "level": 3 My question is, how to delete the Dataset when it is referenced? Thank you in advance. Kind regards, Stefan
asked
Stefan Dankuc
1 answers
0
This is a Teamcenter issue and not related to Mendix. Teamcenter is working as designed and doing the right thing. You have something (probably an Item Revision) in workflow and it has an attached Dataset which has also been attached to the workflow as a target. Teamcenter will correctly stop you from deleting the Dataset while it is in workflow. If you remove it from the workflow you will be able to delete it. However, I question your use-case validity.