Ok i have 2 libraries that use the same content types. I have a workflow that copies a document from one library to the other. Both libraries use versioning, but the target does not require checkout to edit. After the document copy I want to set the version number from the original document on a custom text field on the copied library. I use update item to set the text field of the target document to the version number of the source document. For some reason this update item fails every time. I have also tried setting the column with hard coded values but I continue to get errors in update item. Unfortunately that is all I get An error has occurred in Copy to Published.
This seems like it should be really simple, but I cannot figure out what I am missing here. Any ideas?
Hi Bernard Gehring,
Please share the workflow so I can check the details. My first reaction is adding a 'Commit pending changes' somewhere but having the details will help in helping you.
So I set this up so that the regular expression checks the version if the document, if it is published then the rest of the workflow runs. It copies the item to the new library, the document is successfully copied so this shouldn't be a permissions issue, then after commit pending changes it runs the update item. Disabled in the above view so that users don't get the error.
Thanks for any help.
I am fairly sure. I cleaned up some of the logging I had in place when I posted the workflow earlier. I log in history the result returned from the copy item action and the version string. Then I am performing a query of the new list based on URL Path. I get a result from performing the query and then attempt the update the item using the same filter criteria, based on url path. I will try using that query I did to get the ID, then try the update based on the ID see if that works.