locked
Document Library-GUID or Name in SPD 2007 workflow RRS feed

  • Question

  • Hi,

    We have a custom approver workflow on a document library.

    We need guid or document library name in the workflow.

    need suggestion .

    Thanks


    Dare to promise
    Friday, May 13, 2011 7:11 PM

Answers

  • I think you should create a custom SPD activity and read current document library id from __ListId property.

    More info here

    http://panvega.wordpress.com/2009/01/20/introduction-in-custom-wf-activities/

    http://stackoverflow.com/questions/1243736/how-to-get-the-context-item-in-workflow-activity-sharepoint


    Senior Software Developer - Virtosoftware - Premium Web Parts for Microsoft SharePoint 2007 & 2010
    • Marked as answer by D-Virdi Thursday, May 19, 2011 3:25 PM
    Thursday, May 19, 2011 1:35 PM

All replies

  • Hi D-Virdi,

     

    If I understand correctly, what you want to do is access to the workflow GUID, right? If it is so, you can go through this thread, you will get the code sample of access the workflow GUID by searching against the name of the workflow:

    http://social.msdn.microsoft.com/Forums/en-US/sharepointworkflow/thread/7d847b53-2d58-4bfb-94c6-3f8034dbe661/.

     

    Thanks & Regards,

    Peng Lei

    Monday, May 16, 2011 5:21 AM
  • Hi,

    Thanks for reply.

    Sorry I was not clear enough.

    We have custom approval workflow on a Document Library (Named as Appproval Documents) created using SPD 2007.

    Now in the same wf we need guid of the "Approval Documents" library.

    Thanks in advance.


    Dare to promise
    Tuesday, May 17, 2011 1:47 PM
  • Here's one way to get a library GUID:

    Go to the List Settings for your library. Copy the URL. It should look something like this: http://moss2007/sites/teamsite/_layouts/listedit.aspx?List=%7B363CAEF7%2DDE21%2D4246%2D83BF%2DBB4FA35DE234%7D

    To get the GUID, remove everything before and including "List=". Replace "%7B"with "{". Replace "%7D" with "}". Replace "%2D" with "-". 

    Now your GUID will look like this: {363CAEF7-DE21-4246-83BF-BB4FA35DE234}

     

    Hope this helps.

     


    Planet Technologies || SharePoint Task Force
    Thursday, May 19, 2011 5:59 AM
  • Thanks roland,

    I don't want to hard the guid. I want to access it using SPD as I want to have wf generic.


    Dare to promise
    Thursday, May 19, 2011 1:16 PM
  • I think you should create a custom SPD activity and read current document library id from __ListId property.

    More info here

    http://panvega.wordpress.com/2009/01/20/introduction-in-custom-wf-activities/

    http://stackoverflow.com/questions/1243736/how-to-get-the-context-item-in-workflow-activity-sharepoint


    Senior Software Developer - Virtosoftware - Premium Web Parts for Microsoft SharePoint 2007 & 2010
    • Marked as answer by D-Virdi Thursday, May 19, 2011 3:25 PM
    Thursday, May 19, 2011 1:35 PM