0

Untill last week, i was using SPModerationStatusType to do the Approbe of Draft items in a list in client side, but this week, the same application without changes doesn't work.

I need any dependencie to use it in client side with JavaScript?

thnks.

0

Approve Item use JavaScript like below:

function approveItem(listId,itemId,comment,success,error) {
   var context = SP.ClientContext.get_current();
   var list = context.get_web().get_lists().getById(listId);
   var item = list.getItemById(itemId);

   item.set_item('_ModerationStatus',0);
   item.set_item('_ModerationComments',comment);
   item.update();

   context.executeQueryAsync(
       function(){
           success();
       }, 
       error
    );   
}
  • Of course, i do it in that way, but i can't use the enum SPModerationStatusType, that a week ago it works perfect, instead of the string '0'. – Jesús Velasco López Jan 7 '18 at 12:41

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.