I have a picture slideshow webpart which displays images from a particular library with a particular view. I want to change the webpart property - view using jquery. I have used CSOM to get the webpart property and trying to update using the following code.

    var guid= "11A7007D-3E7F-461D-B080-02E8C2960BE4";
   webPartProperties.set_item(viewGuid , guid);
//save web part changes

The code which I referred to do this is available here I get the following error :

           Unable to system.string to system. guid 

How can I do this in jQuery?


Use SP.Guid Class to represent a globally unique identifier (GUID) in JavaScript.


var viewGuid= new SP.Guid('{11A7007D-3E7F-461D-B080-02E8C2960BE4}');

webPartProperties.set_item('ViewGuid' , viewGuid);

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.