Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

New Post: Blog Post Approval Status

$
0
0

Found the solution:

 

 $().SPServices({
        webURL: "yourwebsiteaddress",
        operation: "UpdateListItems",
        listName: "yourlistname",
        ID: yourlistidvalue,
        batchCmd: "Moderate",
        valuepairs: [["_ModerationStatus", 0]]
    });

 

And just for fun, I worked up a list of the Status values:

hse.ModerateStatus = function (data) {var result = "";switch (parseInt(data)) {case 0:
            result = "Accepted";break;case 1:
            result = "Rejected";break;case 2:
            result = "Pending";break;case 3:
            result = "Draft";break;case 4:
            result = "Scheduled";break;
    }return result;
};


Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>