Posts

Creating an Approval Workflow for SharePoint 2013

Image
Creating an Approval Workflow for SharePoint 2013 How do I create an approval workflow in SharePoint 2013? SharePoint Help:  Now that you have an amazing intranet on SharePoint 2013 you don’t want everyone putting things in your document libraries unless you approve it first. The best way to keep good content on your intranet and bad content out is by attaching an approval workflow to the library. This blog post will give you step by step instructions on how to customize SharePoint and attach an approval workflow to a document library. Step by Step Instructions on How to Create a SharePoint 2013 Approval Workflow Step 1:  Navigate to the document library where you would like to attach the workflow to; an example of this is by clicking the  Documents  title on your Home Page shown below: You will know when you are in the document library when the five titled boxes disappear, shown below: Step 2:  Click the  LIBRARY  tab in the top...

Configure audit settings for a site collection

Image
Configure audit settings for a site collection You can use the audit feature of Microsoft SharePoint Server 2010 to track which users have taken what actions on the sites, content types, lists, libraries, list items, and library files of site collections. Knowing who has done what with which information is critical for many business requirements, such as regulatory compliance and records management. As a site collection administrator, you can retrieve the history of actions taken by a particular user and can also retrieve the history of actions taken during a particular date range. For example, you can determine which users edited a specific document and when they did this. Following is the Configure Audit Settings page. You manage the size of the audit log in the  Audit Log Trimming section and specify which events to audit in the  Documents and Items  and  Lists, Libraries, and Sites  sections. The events that you select to audit are captured in ...

Event Receivers in SharePoint Theory

Event Receivers in SharePoint Through this article I am trying to explain about event receivers in SharePoint. An event receiver is a class that contains one or more methods known as event handlers that are executed automatically by SharePoint in response to events such as adding item to a list.  You can use event handlers for data validation, data integrity etc. SharePoint categories events into of two types 1. Before events (synchronous events) 2. After events (asynchronous events). 1. Before events (synchronous events): These events fires before an action occurs and before SharePoint has written any data to the content database. For example ItemAdding event will fire when trying to add an item to a list. These events does support cancelling of event action. These events are always end with 'ing' like FieldAdding, ItemAdding, ItemUpdating, WebAdding, WebDeleting etc. These events are also know as synchronous events. 2. After events (asyn...

Back up of Site Collection

Back up of Site Collection: We can take back up of site collection by using PowerShell as well as we can take back up from the SharePoint Central Administration also. From SharePoint Central Administration: Open SharePoint 2013 Central Administration, then on the home page, in the Backup and Restore section, click Perform a site collection backup. On the Site collection backup page, select the site collection from the Site Collection list. Then give the file path in the Filename box. Then click on Start Backup. From PowerShell Command: Below is the PowerShell command to backup a site collection: Backup-SPSite -Identity <SiteCollectionURL> -Path <Path of the file> [-Force] Restore Site Collection in SharePoint 2013: We can restore a Site collection by using PowerShell only in SharePoint 2013. Below is the PowerShell command to restore a site collection: Restore-SPSite -Identity <SiteCollectionURL> -Path <Backu...

Export GridView Data to Excel, Word, Pdf, Text and Csv Format and Print in Asp.Net

Image
Export GridView Data to Excel, Word, Pdf, Text and Csv Format and Print in Asp.Net 0 Introduction: This article describes how to export a GridView data to excel, word, pdf, text, csv format and print in ASP.Net. Description Since there is no support for pdf conversion, we require a third-party DLL to be referenced by our application that will use for convert the grid to pdf. itextsharp.dll You can download it from the source code attached to this article.  Design Now add GridvView, six Button for export. Design your screen as in the following screen. Or you can copy the following source code: < body >     < form id ="form1" runat ="server">     < div >         < table >             < tr >               ...
Create SharePoint List Programmatically   are Create a SharePoint list programmatically in C#. Add lookup field for our newly created list. This is a sample code. public void createList() {     // choose your site     SPSite site = new SPSite( "http://merdev-moss:5050" );     SPWeb web = site.OpenWeb();     SPListCollection lists = web.Lists;     // create new Generic list called "My List"     lists.Add( "My List" , "My list Description" , SPListTemplateType.GenericList);     SPList newList = web.Lists[ "My List" ];     // create Text type new column called "My Column"     newList.Fields.Add( "My Column" , SPFieldType.Text, true );     /*create lookup type new column called "Lookup Column"     * Here I am going to get the information from the "Title"     * col...
Image
Creating SharePoint Site Collection Programmatically Creating a SharePoint 2010 site collection programmatically is straightforward. In this example, I will create a SharePoint site collection by using .Net Console Application.  Open Microsoft Visual Studio here i am using Microsoft Visual Studio 2012 and create new console Application project Click File -> New -> Project -> Console Application Enter name of project "SP_New_SiteCollection". and select the targeted framework to .NET Framework 3.5. Make sure that  target platform is 64bit to check this click project ->SP_New_SiteCollection Properties ->build    Now add the SharePoint 2010 reference. In Solution Explorer Right click on References  -> Add Reference then click Extensions and Select Microsoft.SharePoint and click OK     Now Use the following Source Code to Create New Site Collection Programmatically:   using Sys...