GetListItems listName

Oct 25, 2011 at 7:05 PM


  How do I reference a list from another site inside a site collection?

I tried /sites/mysite/mysubsite/lists/mytargetlist

but this did not work.  I did not see anything in the documentation.

Oct 25, 2011 at 7:10 PM

You should see webURL as an option with the operations where it makes sense. It's in the documentation everywhere that it's available.


Oct 26, 2011 at 11:29 AM
Edited Oct 26, 2011 at 11:30 AM


  Thanks.  I used webURL with the full Url.  Is there a function that will take a relative URl and return the full Url?  Also, I am need to query to lists with GetListItems.  Is there a way to combine these into one query?  I saw something that led me to believe it is possible.

Oct 26, 2011 at 11:49 AM
Relative paths should work fine. I think some of the examples use them.

Oct 26, 2011 at 2:32 PM
Edited Oct 26, 2011 at 2:35 PM

Relative worked.  Thanks.  If I have one list in sites/mysites/siteCollectionA/rootweb

and one list in sites/mysites/siteCollectionA/subsiteA

does not the ListService  WebService Url have to change?

is it picking up the ListService Url from the webUrl parameter?

Oct 26, 2011 at 2:36 PM

Yes, that's what webURL is for.