Let's SharePoint

JSOM

  1. HOME
  2. JSOM
December 19, 2018 / Last updated : December 19, 2018 Sethu Customization

How to get SharePoint List Version using JSOM in SharePoint Online?

var Ctx = new SP.ClientContext.get_current(); if (Ctx) { var Web = Ctx.get_web(); var List = Web.get_lists().getByTitle(Name); var query = new SP.CamlQuery(); query.set_viewXml(xmlQuery); var listItems = List.getItems(query); Ctx.load(listItems); Ctx.executeQueryAsync(function (sender, args) { that.DataSet = []; var objlistEnumerator = objlistItems.getEnumerator(); while (objlistEnumerator.moveNext()) { var objListItem = objlistEnumerator.get_current(); var id = objListItem.get_item(‘ID’); var filePath = ‘https://mysharepoint/Lists/Preservenature/’+id+’_.000’ var web […]

October 12, 2018 / Last updated : October 12, 2018 Sethu JSOM

How to Show IPAddress and Client Name in SharePoint 2010/2013/2016/2019 or Office 365?

Hello SharePointers, Here is the JSOM script to display IP address of the Client Machine in SharePoint 2010/2013/2016 & Office 365. <script type=”text/javascript”> $(function(){ $.getJSON(‘https://api.ipify.org?format=json’, function(data){ $(“input[title=’MyIPAddress’]”).val(data.ip); }); }); </script> Happy SharePointing 🙂

May 3, 2018 / Last updated : May 3, 2018 Sethu JSOM

How to add Custom Call out in SharePoint Online/Office 365?

Hello SharePointers, The call out in document library will let you to do share , edit or follow the specific item. In case, if you want to do your custom call out functionality such as adding a new button and opening up a new URL . Her is the source code to achieve the same. […]

February 17, 2018 / Last updated : February 17, 2018 Sethu Client Side Object Model

How to create a Promoted list in SharePoint 2010/2013/2016 or Online using PnP CSOM?

Hello SharePointers Below is the PnP CSOM script to create a promoted list in  SharePoint 2010/2013/2016 or Online using PnP CSOM Script. $ListTemplateInternalName = “PromotedList.stp” $Context = Get-PnPContext $Web = $Context.Site.RootWeb $ListTemplates = $Context.Site.GetCustomListTemplates($Web) $Context.Load($Web) $Context.Load($ListTemplates) Execute-PnPQuery $ListTemplate = $ListTemplates | where { $_.InternalName -eq $ListTemplateInternalName } if ($ListTemplate -eq $null) { Throw [System.Exception] “PnP […]

February 13, 2018 / Last updated : February 13, 2018 Sethu JSOM

How to associate the global resusable workflows to SharePoint list/libraries using JSOM?

Hello SharePointers, Here are the JSOM script to associate global reusable workflow to a SharePoint list/libraries. <script type=”text/javascript”> function AddWorkflow() { var ctx = SP.ClientContext.get_current(); var site = ctx.get_web(); var templates = ctx.get_web().get_workflowTemplates(); var template = templates.getByName(“My worklows”); ctx.load(templates); ctx.load(template); ctx.executeQueryAsync(Function.createDelegate(this, function (sender, args) { var info = new SP.Workflow.WorkflowAssociationCreationInformation(); var taskList = ctx.get_web().get_lists().getByTitle(“Workflow Tasks”); […]

October 14, 2016 / Last updated : October 14, 2016 Sethu JSOM

How to delete a SharePoint list using PnP JS Library in Office 365 or SharePoint 2016?

Hello SharePointers, In this blog, we will go through piece of power shell  JS code to delete a SharePoint list using PnP JS Library. <script type=”text/javascript”> $pnp.sp.web.lists.getByTitle(‘MyCustomLists’).delete().then(function(result) { alert(‘List deleted successfully!!! Have Fun!!’) }); </script> Happy SharePointing Folks!!

October 11, 2016 / Last updated : October 11, 2016 Sethu Client Object Model

How to get Login User Name /Email in SharePoint Online or SharePoint 2013/2016 using JSOM?

Hello SharePointers, In this blog, we will see piece of code get Login User Name /Email in SharePoint Online or SharePoint 2013/2016 using JSOM? <script type=”text/ecmascript”> ExecuteOrDelayUntilScriptLoaded(getUser, “sp.js”); function getUser(){ var ctx= new SP.ClientContext.get_current(); var web = ctx.get_web(); currentUser = web.get_currentUser(); ctx.load(currentUser); ctx.executeQueryAsync(onSuccess, onFailure); } function onSuccess() { alert(currentUser.get_title()); alert(currentUser.get_email()); } function onFailure() { alert(‘request failed’ […]

Recent posts

How to insert table in Modern Pages using PnP Powershell in Office 365/Sharepoint Online?

June 7, 2019

How to set up Access Requests in SharePoint online using Powershell?

May 11, 2019

How to change the default SharePoint suite logo in SharePoint 2013/2016/2019?

April 30, 2019

How to add metadata to Document libraries in SharePoint online using powershell.

April 27, 2019

How to get Sharepoint site details using Powershell in Office 365?

April 17, 2019

How to get alerts for a specific policy in Cloud app security using Powershell

April 16, 2019

How to get the list of custom apps in App catalog using Powershell?

April 9, 2019

How to get the list of policies in Microsoft Cloud app security using window powershell?

April 4, 2019

How to get the list of List and Document library item counts in SharePoint online using Pnp Powershell ?

April 4, 2019

How to restore subsite in a Sharepoint online site collection using Pnp Powershell

April 2, 2019

Category

  • Anonymous access
  • Client Object Model
  • Client Side Object Model
  • Customization
    • Customization
  • Designer Workflows
  • Errors & Resolutions
  • Features
  • Google Analytics
  • InfoPath
  • Item Scheduling
  • JSOM
  • Nintex worflows
  • Office 365
  • Office 365 Groups
  • PnP JS Library
  • PowerShell
  • Powershell Online
  • REST API
  • REST API's
  • Server Side Object Model
  • SharePoint 2010
  • SharePoint 2010 Search
  • SharePoint 2013
  • SharePoint 2013 Search
  • SharePoint 2013 Workflows
  • SharePoint 2016
  • SharePoint 2019
  • SharePoint Designer
  • SharePoint Framework
  • SharePoint Online
  • SharePoint Pnp
  • SharePoint Usage Analytics
  • Unique values
  • User Profile Services
  • Windows Powershell
  • Workflow Manager

Archive

  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • January 2016
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • May 2015
  • April 2015
  • March 2015

Copyright © Let's SharePoint All Rights Reserved.

Powered by WordPress & Lightning Theme by Vektor,Inc. technology.