Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Find a listitem in a site collection

  Asked By: Malinda    Date: Oct 31    Category: Sharepoint    Views: 916

It is possible to get at a listitem through the WSS 3.0 API if you
only have the url of the list and the listitem's id (ordinal not
guid)?

We're building a custom dispform.aspx that we will link to instead of
dispform.aspx from a Content Query Web Part. But the url to this
custom page is really ugly because it contains 2 guids. (webid,
listid)

Our Marketing department would like a less clunky url so they can e-
mail links to news articles.

So we would like to do: http:\\server\_layouts\news\articles.aspx?
u=\site\lists\listname&ID=2

I thought maybe I could use the list data retrieval web service but
it seems like you need the list's guid. I also thought I might be
able to use the search API.

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Shanda Nolan     Answered On: Oct 31

You can use the object model - the URL can be used to get the SPWeb
and/or SPList object, then you can get the SPListItem from the
SPListItemCollection based on the ID field (I don't have the API in
front of me so it might require iterating over the list  items).

 
Didn't find what you were looking for? Find more on Find a listitem in a site collection Or get search suggestion and latest updates.




Tagged: