Posts

Showing posts from May, 2018

Get users from SharePoint Group using REST api

How to get users from SharePoint Group using REST api By using below code you can easily get users from a specific SharePoint Group. function GetUsers(){  $.ajax({ url:_spPageContextInfo.webAbsoluteUrl +"/_api/web/sitegroups/getbyname('GrpName')/users", type: 'GET', dataType: 'json', headers: { "accept": "application/json;odata=verbose;charset=utf-8" }, success: function (data) {           Console.log(data); }, error: function ajaxError(response) { alert(response.status + ' ' + response.statusText); },   }); }

How to use People Picker field in a form using jQuery

Image
Create a Page and add Script Editor web part to it and paste the below code. Code - <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="_layouts/15/sp.runtime.js" type="text/javascript"> </script> <script src="_layouts/15/sp.js" type="text/javascript"> </script> <script src="_layouts/15/clienttemplates.js" type="text/javascript"></script> <script src="_layouts/15/clientforms.js" type="text/javascript"></script> <script src="_layouts/15/clientpeoplepicker.js" type="text/javascript"></script> <script src="_layouts/15/autofill.js" type="text/javascript"></script> <script src="_layouts/15/1033/strings.js" type="text/javascript"></script> var Exte