I created a simple Custom List in WSS3. I also created a Document Library with an additional column field which is a lookup to the Custom List that I created before. Now when I am on the Custom List view I would like to retrieve, for each item of the list, all the linked documents. How can I achieve that?

FYI with SharePoint 2013 I achieved that with a Quick Step in the Custom List that creates a link button to the Document Library view with a certain query (using FilterField and FilterValue). Please keep in mind that I don't know if that solution is correct and I would like another simpler solution also because I can't find a way to create Quick Steps in WSS3.

EDIT: Just so you know I am looking for a solution INTEGRATED within SharePoint, I'd rather not code if possible.

1 Answer 1


Use simple server object model to achieve this

you need to iterate each SPListitem and inside that call a function which will take item id as parameter and then query doc library to get desired items based on that

foreach(SPListitem item in list.items)
   lst.add( GetAllDocs(item.ID));

 public list<Documents> GetAllDocs(int id)
      //Query Doc lib here based on id USE CAML

  • Can you be a little bit more specific? Where do I have to put that code? I am very confident with C# but only with desktop/web applications, never coded with SharePoint. Also CAML is a way to query right?
    – raz3r
    Commented May 15, 2013 at 8:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.