You must Sign In to post a response.
  • Category: Sharepoint

    Open Document library item from List Item


    Are you looking for a way to Open Document library item from List Item ? then read this thread to know more about it



    Hi
    I have a List and Document Library. List have document library reference (Document ID).
    When user click on List Item Title column, it has to open corresponding document.
    Need to do using SharePoint designer.
    Any thoughts will appreciate.

    Regards,
  • #739333
    You can use the Client Object Model for (CSOM) to open sharepoint document library/list item . EXample as mansion below
     
    using System;
    using Microsoft.SharePoint.Client;
    using SP = Microsoft.SharePoint.Client;

    namespace Microsoft.SDK.SharePointServices.Examples
    {
    class RetrieveAllListProperties
    {
    static void Main()
    {
    string siteUrl = "http://YourServer/sites/MySiteCollection";

    ClientContext clientContext = new ClientContext(siteUrl);
    Web oWebsite = clientContext.Web;
    ListCollection collList = MyWebsite.Lists;

    clientContext.Load(collList);

    clientContext.ExecuteQuery();

    foreach (SP.List oList in collList)
    {
    Console.WriteLine("Title: {0} Created: {1}", oList.Title, oList.Created.ToString());
    }
    }
    }

    Helpful responses
    [1]http://msdn.microsoft.com/en-us/library/ee538683%28v=office.14%29.aspx
    [2]http://www.codeproject.com/Articles/650227/SharePoint-2013-Document-Library-List-Settings
    [3]http://social.msdn.microsoft.com/Forums/sharepoint/en-US/e5d78a7a-6b13-4479-a8a3-9ef92247824d/how-to-open-sharepoint-document-librarylist-item-from-an-aspnet-application?forum=sharepointdevelopment

  • #741867
    Hi Phagu Mahato,
    Thanks for your answer..
    Above code will read items from list or library, i don't want that...
    I have a list and library. List is having reference of Library.
    Ex: Library is having 10 records..
    List is having 2 records...
    In the list Item 1 is having library column that value is 2
    List item 2 is having library column that value is 6.

    When i click on list item 1, document id 2 document should download.

    When i click on list item 2, document id 6 document should download.


  • Sign In to post your comments