Posts

Showing posts with the label SHAREPOINT

What is _spPageContextInfo ?

_spPageContextInfo is a  JavaScript context variable, which will rendered for each SharePoint page. _spPageContextInfo holds few proprieties which will be useful in JavaScript and client object model code.  _ spPageContextInfo has below properties:  webServerRelativeUrl  webAbsoluteUrl siteAbsoluteUrl serverRequestPath layoutsUrl webTitle webTemplate tenantAppVersion isAppWeb webLogoUrl webLanguage currentLanguage currentUICultureName currentCultureName env nid fid clientServerTimeDelta updateFormDigestPageLoaded siteClientTag crossDomainPhotosEnabled webUIVersion webPermMasks pagePersonalizationScope userId userLoginName systemUserKey alertsEnabled siteServerRelativeUrl allowSilverlightPrompt themedCssFolderUrl themedImageFileNames To know properties of _spPageContextInfo, go to view page source and find text with "_spPageContextInfo".

Set Choice Field Allow 'Fill-in' Choice option As TRUE For all the Lists in Site Collection Programmatically using C# CSOM in SharePoint Online

Here I demonstrate how to update Choice column property AllowFillInChoice as True for all the Lists in Site Collection using console application using System ; using System.Collections.Generic ; using System.Linq ; using System.Text ; using System.Threading.Tasks ; using Microsoft.SharePoint.Client ; using System.Security ; namespace AllowFillInChoice { class Program { static void Main ( string [] args) { using ( var ctx = new ClientContext( "https://@@@@@@@.sharepoint.com/sites/Dev/" )) { string userName = "---------@-------.onmicrosoft.com" ; string pwd = "--------" ; var securePassword = new SecureString(); ; foreach ( char c in pwd) { securePassword.AppendChar(c); } securePassword.MakeReadOnly(); try {

Filter with NULL value using REST API in SharePoint

$filter=FIeldName ne null url: _spPageContextInfo.webAbsoluteUrl+"/_api/Web/Lists/GetByTitle('Products')/Items?$select=Name,Price,Size&$filter= Size ne null ", The above URL returns the items not having Size field value as Null . ne - Not Equal                     

Introduction To SharePoint Framework

Image
SharePoint Framework is also abbreviated as SPFx. SharePoint Framework offers modern technologies, Node-based development, TypeScript etc. that are applied to SharePoint and Office 365 development. Earlier, we used to create  web-parts  (rectangular boxes with defined functionality) and even business users knew what web-parts are. In SharePoint Framework, these web-parts are termed as  Client web-parts . From a technology perspective, they are quite different, but from a user perspective, they are the same rectangular widgets that the users can add on their pages. In addition, we know about Add-In model and the Iframe-based integration, which we used in our daily SharePoint development. History of SharePoint Development Farm Solutions The development in SharePoint started with Farm Solutions, WSPs, full trust code. This approach was very powerful and developers could literally do whatever they wanted to do on the SharePoint Farm. However, it made upgrades very difficul

Prerequisites To Build SharePoint Solutions With Typescript

Image
TypeScript was developed and introduced by Microsoft. TypeScript is object oriented programming language which is considered as a super set of JavaScript. TypeScript cannot be used directly on SharePoint platforms. TypeScript code has to be precompiled to JavaScript before deploying it on SharePoint. TypeScript has compiler (tsc) to compile the code from TS to JS. The compiler produces a JavaScript file from a TypeScript source file We can install TypeScript for Visual Studio from Microsoft site (https://www.microsoft.com/en-us/download/details.aspx?id=48593). For other versions of Visual Studio, the download links are available from http://www.typescriptlang.org/index.html#download-links. Create a new SharePoint 2016 - Empty project (or SharePoint 2013). Fill in the site URL and select "Deploy as sandbox solution" option.   On Visual Studio, navigate to Tools -> NuGet Package Manager -> Manage NuGet Packages for solution. Install the Type

Benefits Of SharePoint 2016 From A End User Perspective

Image
The new changes introduced in SharePoint 2016. List/Library Improvements  Durable Links This is a feature introduced in SharePoint 2016 for document library. It allows users to rename or move their documents to new locations without breaking the links referring to the document. It also helps in the SEO improvement and search based indexing to let the documents to be functional. Internally, SharePoint maintains the same DocID assigned to the document, even if it is renamed or moved to a different location. We need to activate the “Document ID Service” feature from the Site Collection features page. Henceforth, with the introduction of Durable links in SharePoint 2016, users do not have to worry about the broken or dead links while renaming or moving a document from one document library to another. File Names With the release of SharePoint 2016, Microsoft has introduced two of the good features for documents in a document library:- Special Characters In SharePoint 2013,

Create Custom Sharepoint List Using SharePoint Framework Development Model

Image
Create a new SharePoint Framework project Open any Windows Powershell/command  tool. I prefer to use Powershell. Navigate to a folder or create a new folder ex: FrameWorkList. Run the Yeoman Generator to create SharePoint Framework solution package. yo @microsoft/sharepoint Fill the details required for creating a new SharePoint solution and choose Enter. This will display the prompt, which we must fill up, to proceed with the project creation. What is your solution name? : framework-list On pressing enter, we will be asked to chose the working folder for the project. Where do you want to place your files- Use current folder. What framework would you like to start with- Select “No javaScript web framework” for the time being, as this is a sample Web part. What is your Webpart name- CustomSPFxList What is your Webpart description- We will specify it as ‘This is my Custom List’. Yeoman has started working on the scaffolding of the project. It w

Create WebPart using SharePoint Framework and test it in SharePoint online Workbench

Image
Check this link to setup the SharePoint Framework environment http://techchaitu.blogspot.com/2017/09/what-is-sharepoint-framework-development.html SharePoint Framework  is a page and web part model that provides full support for client-side SharePoint development, easy integration with SharePoint data and support for open source tooling. With the SharePoint Framework, you can use modern web technologies and tools in your preferred development environment  to build productive experiences and apps that are responsive and mobile-ready from day one.   Create a new SharePoint Framework project Open any Windows Powershell/command  tool. I prefer to use Powershell. Navigate to a folder or create a new folder. Run the Yeoman Generator to create SharePoint Framework solution package. yo @microsoft/sharepoint Fill the details required for creating a new SharePoint solution and choose Enter Yeoman has started working on the scaffolding of the project. It will install