Posts

Showing posts with the label SHAREPOINT

Where visual web parts get stored?

The visual web part is stored in two different locations. 1. the Xml file that you import to SharePoint(install) is located in db 2. the user control file is located in the SharePoint file system 3. the DLL is installed on the SharePoint server So the only thing that's installed in SharePoint database is the web part Xml files.

SharePoint 2013 - Get list items using REST

Here I demonstrated how to fetch items of a SharePoint list using Rest. Example code for REST: //get the title of the site var siteUrl = _spPageContextInfo.webAbsoluteUrl; //Ajax call to get data $.ajax({ url: siteUrl + "/_api/web/lists/getbytitle('Give Title of List Name')/items" , method: "GET" , headers: { "Accept" : "application/json; odata=verbose" }, success: function (data) { var listitems = data.d.results; // listitems.forEach(function (entry) { // $('#message').text(listitems["FirstName"]); // }); }, error: function (data) { alert( "Error" ) } });

SharePoint 2013 Event Manager - Tool for deleting and creating event receivers in SharePoint 2013

Image
When developing event receivers in SharePoint, things can get a little bit  untidy  , because, sometimes we might find ourself in a situation where we  have multiple events firing on your SharePoint lists and we don't know why?.And SharePoint doesn't give you any tool for monitoring events.  We have a tool "SharePoint 2013 Event Manager", a simple windows application which enables to monitor all event receivers in you farm, create new events or delete existing events: Download

Create People Picker using SharePoint Hosted App

Image
Here, I demonstrated how to create a People picker using Javascript Example code for JSOM: 1. Open Default.aspx page. Add below code <%-- The markup and script in the following Content element will be placed in the <body> of the page --%> <asp:Content ContentPlaceHolderID= "PlaceHolderMain" runat= "server" > <SharePoint:ScriptLink ID= "ScriptLink1" name= "clienttemplates.js" runat= "server" LoadAfterUI= "true" Localizable= "false" /> <SharePoint:ScriptLink ID= "ScriptLink2" name= "clientforms.js" runat= "server" LoadAfterUI= "true" Localizable= "false" /> <SharePoint:ScriptLink ID= "ScriptLink3" name= "clientpeoplepicker.js" runat= "server" LoadAfterUI= "true" Localizable= "false" /> <SharePoint:ScriptLink ID= &

Create a Folder in Document Library Using Client Object Model (CSOM)

Here, I demonstrated how to create a floder in a document library using CSOM Example code for CSOM: using System.Collections.Generic ; using System.Linq ; using System.Text ; using System.Threading.Tasks ; using Microsoft.SharePoint.Client ; using Microsoft.SharePoint ; namespace FolderCreation { class Program { static void Main ( string [] args) { ClientContext context = new ClientContext( "http://win-pi0rfb9adj8/sites/Home/" ); Web oWeb = context.Web; List oList = oWeb.Lists.GetByTitle( "Give your library" ); ListItemCreationInformation oCreationInfo = new ListItemCreationInformation(); oCreationInfo.UnderlyingObjectType = FileSystemObjectType.Folder; oCreationInfo.LeafName = "Approved" ; ListItem oListItem = oList.AddItem(oCreationInfo); oListItem.Update(); context.ExecuteQuery(); } } }

Create a Folder in Document Library Using Javascript

Image
Here, I demonstrated how to create a floder in a document library using Javascript Example code for JSOM: 1. Open Default.aspx page. 2.Add a button to create a folder. <button id="btnFolder" onclick=" floderCreation ()">Click Here</button> 3.Open  App.js file and below code 'use strict' ; var context = SP.ClientContext.get_current(); var hostweburl; var appweburl; $( document ).ready( function () { hostweburl = decodeURIComponent (getQueryStringParameter( "SPHostUrl" )); appweburl = decodeURIComponent (getQueryStringParameter( "SPAppWebUrl" )); }); function folderCreation() { var ctx = new SP.ClientContext(appweburl); var appCtxSite = new SP.AppContextSite(ctx, hostweburl); var web = appCtxSite.get_web(); var list = web.get_lists().getByTitle( "Documents" ); var folderCreation = new SP.ListItemCreationInformation(); folderCre

Create carousel (Slideshow) using SharePoint App

Image
Open Visual Studio 2013 and create a new SharePoint App as shown here: Open Default.aspx file and add the below code <%-- The following 4 lines are ASP.NET directives needed when using SharePoint components --%> <%@ Page Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" MasterPageFile="~masterurl/default.master" Language="C#" %> <%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register TagPrefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register TagPrefix="SharePoint" Namespace="Microsoft.S

Retrieve the data from List on host web using SharePoint App

Image
Open Visual Studio 2013 and create a new SharePoint App as shown here: Open App.js from the Scripts folder and add the JavaScript code : 'use strict'; var hostweburl; var appweburl; var oItems; // This code runs when the DOM is ready and creates a context object which is needed to use the SharePoint object model $(document).ready(function () {     hostweburl =decodeURIComponent(getQueryStringParameter("SPHostUrl"));     appweburl = decodeURIComponent(getQueryStringParameter("SPAppWebUrl"));     getListData();     }); // This function prepares, loads, and then executes a SharePoint query to get the List data function getListData() {     var ctx = new SP.ClientContext(appweburl);     var appCtxSite = new SP.AppContextSite(ctx, hostweburl);     var web = appCtxSite.get_web();     var list = web.get_lists().getByTitle("Slideshow");     var query = new SP.CamlQuery(); //The Query object. This is used t

Delete Site Using NINTEX Workflow in SharePoint

Image
In this article you will see how to delete the site using the NINTEX workflow in SharePoint. I have created a custom list named "Site Provisioning" in which I have the following columns: The Title column specifies the site title and description column to specify the site description and Delete is a Boolean value to specify whether the site must be deleted. Create of site deletion workflow The following is the procedure for creation of the site deletion workflow: Navigate to the "Site Provisioning"  list. Click on the List tab and then click on "Workflow Settings" . Click on "Create a Workflow in Nintex Workflow". Click on "Cancel" . Drag and drop the "Run if"  (used to check if the "Delete"  column has a yes value then only the "Delete Site" action will be executed) action from the "Logic and flow"  section. Drag and drop the "Delete Site"  action from the "Provisioning&q

Send an Email Notification Using Nintex Workflow in SharePoint 2013

Image
Welcome to Nintex Workflows where we will see today the most important and mostly used functionality of sending an email using Nintex Workflow in SharePoint 2013. I know it is a part of all our developments throughout. So let's see how it is done. Go to the list or Document Library you want this functionality to work on. Go to the List or Library tab and you will find the icon as Nintex Workflow. Click on the icon and you will see the following screen. Here we have actions on the left side and on the center as you can see we can insert an action by clicking on it. As we can see the following we can insert the action from: Integration Libraries and Lists Logic and Flow Operations User Interactions Utility So as we can see I have inserted an action from User Interaction named Send an Email. On clicking on it we will see the following screen as Send an Email. You might be seeing an exclamatory mark as a warning because it is yet not configured. Once we configure it the noti

SharePoint 2013 - Get list items using REST

Here I demonstrated how to fetch items of a SharePoint list using Rest. Example code for REST: //get the title of the site var siteUrl = _spPageContextInfo.webAbsoluteUrl; //Ajax call to get data $.ajax({ url: siteUrl + "/_api/web/lists/getbytitle('Give Title of List Name')/items" , method: "GET" , headers: { "Accept" : "application/json; odata=verbose" }, success: function (data) { var listitems = data.d.results; // listitems.forEach(function (entry) { // $('#message').text(listitems["FirstName"]); // }); }, error: function (data) { alert( "Error" ) } });