1

I can't get the array of the selected items on a published page. I used SP.ListOperation.Selection.getSelectedItems(). It all works if the page is checked out, but it returns nothing if the page is published.

For the record I want to call a service that needs the list ID and selected item ID.

Note: I have 3 XSLTListView webparts on the same page.

1

Had the same weired (as I thought) problem. On published pages you should use

SP.SOD.executeFunc('sp.js', 'SP.ListOperation', onSharePointReadyFunc);

to execute your script.

SharePoint loads only demanded scripts on published pages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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