Can't delete an object

hcodpleh
edited February 4, 2009 in Documentum #1

ERROR: Delete operation failed.
Error while performing delete operation: Cannot delete 'File_Name'. [DM_SYSOBJECT_E_CANT_DESTROYU]error: "Cannot destroy sysobject named: 'Untitled' since it is referenced by another compound document or an assembly object."

Any idea?

R.

Comments

  • gcamou
    edited January 29, 2009 #2

    Hi...

    this is my code, used for delete

    I hope you serve...

            public void DeleteFile(string documentumId)
            {
                try
                {
                    DeleteProfile deleteProfile = new DeleteProfile();

                    deleteProfile.IsDeepDeleteFolders = true;
                    deleteProfile.IsDeepDeleteChildrenInFolders = true;
                    deleteProfile.VersionStrategy = DeleteVersionStrategy.ALL_VERSIONS;

                    OperationOptions operationOptions = new OperationOptions();
                    operationOptions.DeleteProfile = deleteProfile;

                    ObjectIdentity sampleCabinetIdentity = new ObjectIdentity(new ObjectId(documentumId), _repository);
                    ObjectIdentitySet objIdSet = new ObjectIdentitySet();

                    objIdSet.AddIdentity(sampleCabinetIdentity);

                    objectService.Delete(objIdSet, operationOptions);
                }
                catch (Exception ex) { throw ex; }
            }

  • ldallas
    edited January 29, 2009 #3

    error says its part of an assembly - I have to look up that syntax because I don't have it right at hand but if it just has a relation tied to it - like a WebPublisher template - the following will find it

    select r_object_id from dm_relation where parent_id = '<object id of the object you want to delete'>'

    select r_object_id from dm_relation where child_id = '<object id of the object you want to delete'>'

    delete the relation first - then the object

  • Cristian_Orellana
    edited January 30, 2009 #4

    Hello,

    Also check if the document is part of a virtual document.

    Regards.

  • alain_molimard
    edited February 4, 2009 #5

    Yep!

    Running this query will give you all VM that contains the document you are trying to delete:

    select * from dm_sysobject where r_object_id in (select parent_id from  dmr_containment where component_id = 'Object ID of the document you try to delete')

    Enjoy!

    Al