Category Archives: Jsom

Upload JSON Object as a File into OFfice 365 using JavaScript (JSOM)

Hi, In this post, I am going to show how to convert and upload a JSON Object into a SharePoint library using JavaScript Client Object Model. That approach will be valid using the code inside a SharePoint Web Part, will not be valid for SP Apps or JavaScript applications running outside of SharePoint context. Here Read More →

Update Page Layout by using JavaScript (JSOM) in Office 365

  Hi, I’m going to show how to update or change the page layout for a given SharePoint page. That sounds quite straightforward, but we have to mind some important bits: – Check in, check out status of the current page or item we are changing. – CAML query using Page Layout as a FieldRef Read More →

CAML Query to Filter Lookup Field by Id using JSOM in Office 365 / SharePoint 2013

Hi, Few days ago, I wrote a post about how to Create a new lookup field using JSOM in Office 365. Continuing with the same scenario, we have two related libraries: Documents and Pages, and the requirement is to see for every page one list of related documents. So, the first step, was creating a Read More →

Retrieve Static and Internal Field Names of a SharePoint List using JavaScript in Office 365

Hi, There are scenarios where we need to show and compare Internal and Static field names of a SharePoint list. For instance, if we want to do CAML query over some custom fields, but we don’t remember exactly the Internal Name of the field, we can use this code directly copied and pasted in the Read More →

Create a new Lookup field using JSOM in SharePoint 2013 / Office 365

Hi, When we need to provision a new lookup column referencing a Library we can thing about using XML procedure that means using a code similar to this one: But, bad news here, this code is expecting something like “List/ListName” and it doesn’t works for a Libraries. Unless you put there directly the Library ID Read More →

Update WebPart Properties (JSLink) using JSOM in SharePoint 2013 (Office 365)

Hi there, Working with SharePoint Online, we should be thinking on solving provisioning tasks using JSOM in combination with XML using SharePoint provisioning engine. This post is intended to describe how to update a WebPart Property using JSOM. Specifically, I am updating JSLink property for a given webpart and page.   var listName = “NewsIdeas” Read More →

Get View by URL method implemented in JSOM for SharePoint 2013 / Office 365

Hi, If we take a look at SP.View object (sp.js) provided by Microsoft as part of JSOM libraries, we can see all Methods and Properties available like update, defaultView, title, … But, if we are looking for a way to get one  of all available views inside a List/Library, we should look at SP.ViewCollection object. Read More →

Get Pages Library by GUID using JSOM in SharePoint 2013 / Office 365

Hi there, Currently I am working on a multilingual project using Office 365. As a developer, designing multilingual solutions for SharePoint, is tricky, because you need to take off your code all things like names of lists, names of views, etc. In this post we will see how we can get the Pages Library using Read More →

Understanding Refinement Web Part on SharePoint 2013 Online (Office 365)

In SharePoint 2013, a new search web part named Refinement was introduced, which helps in narrowing down the search results. Refiners are based on managed properties from the search index. To use managed properties as refiners, the managed properties must be enabled as refiners, or crawled properties must be mapped to managed properties that are Read More →

SharePoint 2013 JavaScript Search files classes reference – Refinement Web Part classes in detail

With SharePoint 2013, the search capabilities are heavily invested in and we see a lot of new JavaScript files in our pages. For example, in term of Search Result Pages, we have a lot of JavaScript files and functions. The goal of this post is to have like a API reference about these Search JS Read More →