Gowtham

Gowtham

  • NA
  • 516
  • 40.7k

Update SharePoint group description using Rest API

Mar 9 2017 8:13 AM
unction UpdateGroup()
{
debugger;
var addNewItemUrl ="/_api/web/sitegroups(26)";
var item =
{
"__metadata": { 'type': 'SP.Group' },
'Description': 'New description of the group'

',
};
groupupdate(addNewItemUrl, item);
}
function groupupdate(url2, data)
{
$.ajax({
url: _spPageContextInfo.webAbsoluteUrl+url2,
type: "POST",
headers:
{
"content-type": "application/json;odata=verbose",
"X-RequestDigest": $("#__REQUESTDIGEST").val(),
"X-HTTP-Method":"MERGE"
},
data: JSON.stringify(data),
success: function (data) {
alert("Group_Upuccessfully");
},
error: function (error) {
console.log(JSON.stringify(error));
}
});
}
For this code description are updating in right way.But I can't view on the people and groups on share point.
<d:Description>New description of the group</d:Description>
The description shows in xml was changed.
 
 
 

Answers (1)