{"id":9294,"date":"2016-11-11T08:46:18","date_gmt":"2016-11-11T07:46:18","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/documentum-cannot-delete-document-due-to-vdassembly-references\/"},"modified":"2016-11-11T08:46:18","modified_gmt":"2016-11-11T07:46:18","slug":"documentum-cannot-delete-document-due-to-vdassembly-references","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/documentum-cannot-delete-document-due-to-vdassembly-references\/","title":{"rendered":"Documentum &#8211; Cannot delete document due to VD\/assembly references"},"content":{"rendered":"<p>I went into an error that you might already have once, so here is a quick guide on how to fix it.<\/p>\n<p>When deleting a document from D2 I had a popup with an error like: Cannot delete file because it is still referenced in a virtual document or an assembly. Well indeed the document that I wanted to delete was previously in a VD, but for some reasons I couldn\u2019t find the VD by the search engine as it was deleted, but not its old versions.<\/p>\n<p>To summarize, my document was still referenced by the old versions of a deleted VD. So here&#8217;s the way I fixed it:<\/p>\n<p>First, I needed to know which VD referenced it, for this simply use the table dmr_containment:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">select * from dmr_containment where component_id='&lt;DOCUMENT_ID&gt;';<\/pre>\n<p>You should see a list of ids like:<\/p>\n<pre>r_object_id: ID of the current row (we will need it)<\/pre>\n<pre>parent_id: ID of the VD that references our document<\/pre>\n<pre>component_id: ID of our document<\/pre>\n<pre>order_no: Index order of all documents in this VD<\/pre>\n<p>The problem with old versions VD is that it is set as immutable so you can&#8217;t remove the document from the VD through DQL and API. You first have to set it mutable.<\/p>\n<p>So here is the condensed version of API to remove a component in an immutable VD:<\/p>\n<pre class=\"brush: text; gutter: true; first-line: 1\">fetch,c,&lt;PARRENT_ID&gt;\nset,c,l,r_immutable_flag\nF\nsave,c,l\nremovepart,c,l,&lt;R_OBJECT_ID&gt;\nsave,c,l\nfetch,c,l\nset,c,l,r_immutable_flag\nT\nsave,c,l<\/pre>\n<p>If you have a lot of entries to remove, you may want a scripted version in DQMan:<\/p>\n<p>First select all entries:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">select * from dmr_containment where component_id='&lt;DOCUMENT_ID&gt;';<\/pre>\n<p>Select all rows, right click and generate the script:<\/p>\n<pre class=\"brush: text; gutter: true; first-line: 1\">fetch,c,{parent_id}\nset,c,l,r_immutable_flag\nF\nsave,c,l\nremovepart,c,l,{r_object_id}\nsave,c,l\nset,c,l,r_immutable_flag\nT\nsave,c,l<\/pre>\n<p>Verify that each entries have been deleted and now you should be able to remove your document without errors.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I went into an error that you might already have once, so here is a quick guide on how to fix it. When deleting a document from D2 I had a popup with an error like: Cannot delete file because it is still referenced in a virtual document or an assembly. Well indeed the document [&hellip;]<\/p>\n","protected":false},"author":40,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[197],"tags":[979,936,980,129,232,981,982,983],"type_dbi":[],"class_list":["post-9294","post","type-post","status-publish","format-standard","hentry","category-application-integration-middleware","tag-api","tag-dctm","tag-dmr_containment","tag-documentum","tag-dql","tag-reference","tag-vd","tag-virtual"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Documentum - Cannot delete document due to VD\/assembly references - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/documentum-cannot-delete-document-due-to-vdassembly-references\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Documentum - Cannot delete document due to VD\/assembly references\" \/>\n<meta property=\"og:description\" content=\"I went into an error that you might already have once, so here is a quick guide on how to fix it. When deleting a document from D2 I had a popup with an error like: Cannot delete file because it is still referenced in a virtual document or an assembly. Well indeed the document [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/documentum-cannot-delete-document-due-to-vdassembly-references\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2016-11-11T07:46:18+00:00\" \/>\n<meta name=\"author\" content=\"Middleware Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Middleware Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/documentum-cannot-delete-document-due-to-vdassembly-references\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/documentum-cannot-delete-document-due-to-vdassembly-references\\\/\"},\"author\":{\"name\":\"Middleware Team\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8d8563acfc6e604cce6507f45bac0ea1\"},\"headline\":\"Documentum &#8211; Cannot delete document due to VD\\\/assembly references\",\"datePublished\":\"2016-11-11T07:46:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/documentum-cannot-delete-document-due-to-vdassembly-references\\\/\"},\"wordCount\":245,\"commentCount\":0,\"keywords\":[\"api\",\"dctm\",\"dmr_containment\",\"Documentum\",\"DQL\",\"reference\",\"VD\",\"virtual\"],\"articleSection\":[\"Application integration &amp; Middleware\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/documentum-cannot-delete-document-due-to-vdassembly-references\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/documentum-cannot-delete-document-due-to-vdassembly-references\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/documentum-cannot-delete-document-due-to-vdassembly-references\\\/\",\"name\":\"Documentum - Cannot delete document due to VD\\\/assembly references - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"datePublished\":\"2016-11-11T07:46:18+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8d8563acfc6e604cce6507f45bac0ea1\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/documentum-cannot-delete-document-due-to-vdassembly-references\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/documentum-cannot-delete-document-due-to-vdassembly-references\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/documentum-cannot-delete-document-due-to-vdassembly-references\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Documentum &#8211; Cannot delete document due to VD\\\/assembly references\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8d8563acfc6e604cce6507f45bac0ea1\",\"name\":\"Middleware Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g\",\"caption\":\"Middleware Team\"},\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/middleware-team\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Documentum - Cannot delete document due to VD\/assembly references - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/documentum-cannot-delete-document-due-to-vdassembly-references\/","og_locale":"en_US","og_type":"article","og_title":"Documentum - Cannot delete document due to VD\/assembly references","og_description":"I went into an error that you might already have once, so here is a quick guide on how to fix it. When deleting a document from D2 I had a popup with an error like: Cannot delete file because it is still referenced in a virtual document or an assembly. Well indeed the document [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/documentum-cannot-delete-document-due-to-vdassembly-references\/","og_site_name":"dbi Blog","article_published_time":"2016-11-11T07:46:18+00:00","author":"Middleware Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Middleware Team","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/documentum-cannot-delete-document-due-to-vdassembly-references\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/documentum-cannot-delete-document-due-to-vdassembly-references\/"},"author":{"name":"Middleware Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1"},"headline":"Documentum &#8211; Cannot delete document due to VD\/assembly references","datePublished":"2016-11-11T07:46:18+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/documentum-cannot-delete-document-due-to-vdassembly-references\/"},"wordCount":245,"commentCount":0,"keywords":["api","dctm","dmr_containment","Documentum","DQL","reference","VD","virtual"],"articleSection":["Application integration &amp; Middleware"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/documentum-cannot-delete-document-due-to-vdassembly-references\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/documentum-cannot-delete-document-due-to-vdassembly-references\/","url":"https:\/\/www.dbi-services.com\/blog\/documentum-cannot-delete-document-due-to-vdassembly-references\/","name":"Documentum - Cannot delete document due to VD\/assembly references - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2016-11-11T07:46:18+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/documentum-cannot-delete-document-due-to-vdassembly-references\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/documentum-cannot-delete-document-due-to-vdassembly-references\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/documentum-cannot-delete-document-due-to-vdassembly-references\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Documentum &#8211; Cannot delete document due to VD\/assembly references"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1","name":"Middleware Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g","caption":"Middleware Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/middleware-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/9294","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=9294"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/9294\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=9294"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=9294"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=9294"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=9294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}