none
issue with SPD workflow to create link to document in another library

    Question

  • I'm trying to create a link to a document content type in a library to the document that was uploaded to a different library.  Firing on item creation.  

    Everything works fine (now that I found answers to the permissions issues) except when it creates the link to a document content type item, the aspx file created is completely blank.  I can't seem to figure out how to get the newlink.aspx to fire...or at least i don't think it does given the result...or maybe it is firing but not receiving the appropriate data.

    In the SPD workflow I'm filling the URL with the URL of the current item.  That field itself works fine, but it's not pulled into the aspx for redirect.

    In the past (SP2010) I had this working but I can't recall how I did it.  I believe I used a 3rd library as a go-between but have no idea why I did it or how it was configured to solve this.

    I scoured the internet for many hours and found no other person with this issue...strange...so I'm asking here!

    Suggestions?

    Thanks!

    Thursday, October 13, 2016 9:07 PM

Answers

  • In case this helps someone else, I found a way to make this work.

    • Create a new library to be used by the workflow as a staging area (let's call it TempLib)
    • Turn on Content Types on that library and add the Link to a Document Content Type
    • Create a new Link to a Document in TempLib.  The name and URL can be anything. (let's call this TempItem)
    • Create a workflow on your live source library to UPDATE TempItem to change the name and URL to match what you want from the source item.  You can find TempItem by using it's ID field.  You'll just edit this item over and over.
    • Create a workflow on TempLib that COPIES the item to your target library upon item change.
    • Be sure to add a Pause for Duration at the start of each workflow so that it doesn't fire before the metadata is updated.

    The redirect works as expected using this method.  Changing the URL field is all that is necessary to have the aspx file redirect to the new location.

    My workflows aren't firing automatically but I believe it's because I am using the site collection admin account...which SP has always prevented from starting a WF automatically.

    Monday, October 17, 2016 8:56 PM

All replies

  • In case this helps someone else, I found a way to make this work.

    • Create a new library to be used by the workflow as a staging area (let's call it TempLib)
    • Turn on Content Types on that library and add the Link to a Document Content Type
    • Create a new Link to a Document in TempLib.  The name and URL can be anything. (let's call this TempItem)
    • Create a workflow on your live source library to UPDATE TempItem to change the name and URL to match what you want from the source item.  You can find TempItem by using it's ID field.  You'll just edit this item over and over.
    • Create a workflow on TempLib that COPIES the item to your target library upon item change.
    • Be sure to add a Pause for Duration at the start of each workflow so that it doesn't fire before the metadata is updated.

    The redirect works as expected using this method.  Changing the URL field is all that is necessary to have the aspx file redirect to the new location.

    My workflows aren't firing automatically but I believe it's because I am using the site collection admin account...which SP has always prevented from starting a WF automatically.

    Monday, October 17, 2016 8:56 PM
  • Hi G00ch,

    Thanks for your sharing, it will help others who stuck with the same issue in the forum.

    Best Regards


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Tuesday, October 18, 2016 7:44 AM