Sachin RK
Sachin RK

Reputation: 21

Can we access list from different site collection using SPService JQuery?

I want to read list from different site collection. Is there any way to do this ?

Upvotes: 0

Views: 4247

Answers (1)

Jan Vanek
Jan Vanek

Reputation: 889

Here is the sample successfully tested with SPServices JQuery 2014.01:

        $().SPServices({
        operation: "GetListItems",
        // Force sync so that we have the right values for the child column onchange trigger
        async: false,
        webURL: "/webs/sitecollection/site",
        listName: "tst",
        // Filter based on the currently selected parent column's value
        // Only get the parent and child columns
        CAMLViewFields: "<ViewFields><FieldRef Name='Title' /></ViewFields>",
        // Override the default view rowlimit and get all appropriate rows
        CAMLRowLimit: 0,
        completefunc: function(xData, Status) {
            window.alert(Status);
        }
    });

Upvotes: 4

Related Questions