Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
WebserviceCall = function () {
var enable = true;
var listId = SP.ListOperation.Selection.getSelectedList();
var items = SP.ListOperation.Selection.getSelectedItems();
if (items.length == 0)
return false;
var selectedIds = new Array();
for (var i in items) {
//The list id is a GUID string like, i.e. "{77c51b5a-fb48-4228-8c92-ee5834d7fefc}"
var data = { selectedIds: selectedIds, listId: listId };
url: "/sites/docs/_vti_bin/RibbonMethods.asmx/IsAnyDocumentScheduled",
type: "POST",
dataType: "json",
data: JSON.stringify(data), async: false,
success: function (result, status) {
enable = result.d;
error: function (jqXHR, textStatus, errorThrown) {
MS.InformationManagement.Common.ShowStatus(jqXHR.responseText, 'red', 6000);
enable = false;
contentType: "application/json; charset=\"utf-8\""
return enable;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment