Category Archives: sharepoint online

SharePoint Designer Call HTTP Web service with RequestDigest

Using Sharpoint Designer we can create an activity of type “call Http Web Service” to manage sharepoint using Rest API.  Workflow 2013 support the JSON format. then we must to tell to the Rest call that we accept JSON format. … Continue reading

Posted in SharePoint 2013, sharepoint online | Leave a comment

Bing Maps- geolocation column

Overview bing Map This feature was integrated  in SharePoint 2013 (automatically in SharePoint Online).  based on Bing map service  https://www.bingmapsportal.com/ISDK/AjaxV7#CreateMap1. Mostly, there is a field type « Geolocation »  (Hidden)  that integrate any call of the Map service, and show the data … Continue reading

Posted in SharePoint 2013, sharepoint online | Leave a comment

send Mails sp.js

Utilities.SendMail = function (from,to, body, subject,success,error) { //Get the relative url of the site var siteurl = _spPageContextInfo.webServerRelativeUrl; var urlTemplate = siteurl + “/_api/SP.Utilities.Utility.SendEmail”; $.ajax({ contentType: ‘application/json’, url: urlTemplate, type: “POST”, data: JSON.stringify({ ‘properties’: { ‘__metadata’: { ‘type’: ‘SP.Utilities.EmailProperties’ }, … Continue reading

Posted in sharepoint online | Leave a comment

Permissions list

var list = web.get_lists().getByTitle(titleList); list.breakRoleInheritance(false, true); var roleDefBindingAdmin = SP.RoleDefinitionBindingCollection.newObject(context); roleDefBindingAdmin.add(web.get_roleDefinitions().getByType(SP.RoleType.administrator)); var roleDefBindingColl = SP.RoleDefinitionBindingCollection.newObject(context); roleDefBindingColl.add(web.get_roleDefinitions().getByType(SP.RoleType.contributor)); var roleDefBindingRead = SP.RoleDefinitionBindingCollection.newObject(context); roleDefBindingRead.add(web.get_roleDefinitions().getByType(SP.RoleType.reader)); list.get_roleAssignments().add(groupCollection.getByName(Gr_Owner), roleDefBindingAdmin); list.get_roleAssignments().add(groupCollection.getByName(Gr_PPM_Corportate), roleDefBindingColl); list.get_roleAssignments().add(groupCollection.getByName(Gr_PPM_Network), roleDefBindingRead); context.executeQueryAsync(function () { SuccessMessage(‘permissions of list <strong>’ + titleList + ‘</strong> was updated’); … Continue reading

Posted in JSOM, sharepoint online | Leave a comment

Create groups

var arrayGroups = [{ name:”gr1″, desc: “” }, { name: “gr2”, desc: “” }, ] var syncGroup = new Synchronizer(Phase_CreateGroups); function CreateGroups() { //Get all groups in site var groupCollection = web.get_siteGroups(); context.load(groupCollection); arrayGroups.forEach(function (item) { // Create Group information … Continue reading

Posted in JSOM, sharepoint online | Leave a comment

Manage List sp.js

//récupère ma liste des éléments d’une liste dans un dossier Utilities.GetListItemsByFolder = function (webUrl, ListTitle, query, folderName, success, error) { var clientContext = new SP.ClientContext(webUrl); var oList = clientContext.get_web().get_lists().getByTitle(ListTitle); var rootFolder = oList.get_rootFolder(); clientContext.load(rootFolder); //charger le root folder clientContext.executeQueryAsync(function (sender, … Continue reading

Posted in JSOM, sharepoint online | Leave a comment

Taxonomy sp.js

Utilities.GetTermById = function (TermSetId, TermGuid, success, error) { var context = SP.ClientContext.get_current(); var session = SP.Taxonomy.TaxonomySession.getTaxonomySession(context); var termStore = session.getDefaultSiteCollectionTermStore(); var termSet = termStore.getTermSet(TermSetId); var terms = termSet.get_terms(); context.load(termSet); context.load(terms); context.executeQueryAsync(function () { var termEnumerator = terms.getEnumerator(); var allTerms = … Continue reading

Posted in sharepoint online, Taxpnomy | Leave a comment