Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Finally, we got through the support services processes at Microsoft and got a solution!</strong></p> <p>First, Microsoft stated this to be a bug. It is a minor bug, because there is a good workaround, so it may take some longer time, until this bug will be fixed (the support technician said something with next service pack oder next version (!)).</p> <p>But now for the problem. </p> <p><strong>The reaseon</strong></p> <p>Let's take a look at the CAML code from my question:</p> <pre><code>&lt;Method ID='1' Cmd='Update'&gt; &lt;Field Name='ID'&gt;1&lt;/Field&gt; &lt;Field Name='myDummyPropertyField'&gt;NewValue&lt;/Field&gt; &lt;/Method&gt; </code></pre> <p>For any reason the Workflow Manager does not work with the ID, we entered in the second line. Strange, all other SharePoint commands are working with the ID, but not the Workflow Manager. The Workflow Manager works with the "fully qualified" document name. So, because we had no clue and didn't entered any fully qualified document name, the Workflow Manager defaults to the name of the current document library. And now the error message begins to make sense:</p> <pre><code>The object specified does not belong to a list. </code></pre> <p>Of course, the object (document library) does not belong to a list, it IS the list.</p> <p><strong>The solution</strong></p> <p>We have to add one more line to our CAML Query: </p> <pre><code>&lt;Field Name='FileRef'&gt;/sites/mySite/myDocLib/myFolder/myDocument.txt&lt;/Field&gt; </code></pre> <p>The FileRef passes the fully qualified document name to the Workflow Manager, which - now totally happy - starts the workflow of the item.</p> <p>Be careful, you have to include the full absolute server path, omitting your server name (found for example in ServerRelativePath property of your SPItem).</p> <p>Full working CAML Query:</p> <pre><code> &lt;Method ID='1' Cmd='Update'&gt; &lt;Field Name='ID'&gt;1&lt;/Field&gt; &lt;Field Name='FileRef'&gt;/sites/mySite/myDocLib/myFolder/myDocument.txt&lt;/Field&gt; &lt;Field Name='myDummyPropertyField'&gt;NewValue&lt;/Field&gt; &lt;/Method&gt; </code></pre> <p><strong>The future</strong></p> <p>Perhaps this undocumented behaviour will be fixed in one of the upcoming service packs, perhaps not. Microsoft Support apologized and is going to release an MSDN Article on this topic. For the next month I hope this article on stackoverflow will help developers in the same situation.</p> <p>Thanks for reading!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload