Tuesday, December 30, 2014

SHAREPOINT 2013 WORKFLOW: INSTALLING AND CONFIGURING

In order to install Workflow Manager, you will need to download it as part of the Web Platform Installer 4.0, which is packaged with Workflow Manager 1.0. You can download this directly from Microsoft here.

Install Workflow Manager 1.0 using Web Platform Installer 4.0

  1. Browse to the download location and run the workflowmanager.exe.
  2. Click Install from the Workflow Manager 1.0 screen.Install Workflow Manager 1.0
  3. Click I Accept from the Prerequisites screen.
  4. Accept Prerequisites screen of Workflow Manager 1.0This will begin the installation process of Workflow Manager 1.0. When this has completed, we can then begin the configuration.Begin installation process of Workflow Manager 1.0
  5. Now that the installation has completed, it’s time to configure. Click Continue on the Configure screen, as seen below.Begin configuration process of Workflow Manager 1.0
  6. After clicking Continue, you will see the Workflow Manager Configuration Wizard after a few seconds. In this example, we will choose Configure Workflow Manager with Default Settings (Recommended).Configure Workflow Manager with Default Settings
  7. On the New Farm Configuration screen, enter the appropriate SQL server and the credentials. As you can see, in this example, I am using SQL Authentication, rather than Windows Authentication. Either option is fine. Test Connection.New Farm Configuration screen
  8. In the Configure Service Account section, enter the appropriate service account you would like to use to run the Workflow Manager. In this example, I created a service account explicitly for the WM.Configure Service Account*If your SharePoint farm is not using an SSL certification, please check the checkbox next toAllow Workflow Management over HTTP on this Computer.
  9. In the Certificate Generation Key section, enter a unique key. In this particular example, I used the Farm Passphrase that was created when joining these servers to the SharePoint Farm. Enter a key and press the right arrow to continue.Certificate Generation Key
  10. When the Summary page is displayed, verify all information is correct. Click the checkmark to complete the configuration information.Complete Workflow Manager configuration informationThis will begin the configuration process. When this has completed, you should see similar to the below.Complete Workflow Manager configuration process
  11. Click the check mark to complete the configuration.
In this example, we are using a single server SharePoint Farm. The Workflow Manager client must be installed on every SharePoint server in your farm.

Configure Workflow Manager with SharePoint 2013

Now that the Workflow Manager is installed on the system, we must now configure it so that it works with the SharePoint 2013 Farm.
  1. Browse to the Start menu and open the SharePoint 2013 Management Shell.SharePoint 2013 Management Shell
  2. Run the following command, using the appropriate information:
Register-SPWorkflowService –SPSite https://sharepointsiteurl.com/ -WorkflowUrihttp://servername.domain.local:12290

Verify Installation of Workflow Manager:

The easiest way to verify that the installation was successful is to use SharePoint Designer 2013 to attempt creating a workflow.
  1. Using SharePoint Designer 2013, open the site used in the steps above.
  2. Select Workflows from the Site Objects menu.SharePoint Designer 2013 Workflows
  3. Select List Workflow from the ribbon bar and then select any item in the drop-down list.SharePoint Designer 2013 List Workflows
  4. This will open the Create List Workflows dialog box. Under the Platform Type menu, you should now see at least SharePoint 2010 Workflow and SharePoint 2013 Workflow as seen below.
BEFORE SharePoint 2013 Workflow Manager Installation:
BEFORE SharePoint 2013 Workflow Manager Installation
*Note the informational message at the bottom of the above dialog box.
AFTER SharePoint 2013 Workflow Manager Installation:
AFTER SharePoint 2013 Workflow Manager Installation
That’s it! You are now able to take full advantage of the SharePoint 2013 Workflow engine.

Friday, December 19, 2014

SharePoint 2013 Apps Vs Farm solutions

Comparison between Apps and Farm solutions in sharepoint 2013
SharePoint 2013 has introduces the new Cloud App Model that enables you to create apps.
In SharePoint 2010 you had an Option to Add custom components to SharePoint via SharePoint Sandboxed or Farm solutions.But in SharePoint 2013 sandboxed solutions are deprecated.So all we got is the New App model and the Old SharePoint Farm solutions.

SharePoint 2013 – Apps Vs Farm solutions
AppsFarm Solutions
What are apps -
An app for SharePoint is a small, easy-to-use, stand-alone app that solves a specific end-user or business need.
What are Farm solutions - Farm solutions are pieces of functionality that extend the capabilities of a SharePoint website. They are Installed to the solution store of a farm by a farm administrator.
where does it run – The code for an app runs in different places, depending on where your app is hosted.They never run in the context of SharePoint Server, but they will run in the context of the browser or in the context of the hosted platform.
  1. SharePoint-hosted apps
  2. Provider-hosted and autohosted apps – In the cloud
  3. Apps that have a mix of components in SharePoint and in the cloud
where does it run – They are Installed to the solution store of a farm by a farm administrator. They run from the sharepoint server.
How Does It run - When you deploy a SharePoint-hosted app, SharePoint creates a new website called the app web. You can think of it as a dynamically created safe space for your app. Besides allowing you to store pages, lists, and libraries, the app web is also an isolated endpoint that your app can securely call client side by using JavaScript.How Does It run -
when you deploy a Farm solution, It gets deployed to one or more web apps (any existing or new one). You can use it in any site collection of the web app where you deployed it.
Authentication options - Before you can call SharePoint APIs from your app, you need to authenticate to SharePoint. Which authentication mechanism you use depends upon where the code of your app is running.
* Inside SharePoint: You have to use HTML and JavaScript, and authentication is already taken care for you.
* In the cloud: You have two choices:
Use client-side code along with the cross-domain library.
User server-side code along with OAuth.
*REST APIs
Authentication options - The components in the solution can, and usually do, run in full trust
Resource Allocation -
Site collection administrators and tenant administrators can monitor apps and change the resources allocated to them.
Resource Allocation - No resource usage restrictions are placed on them
What Can be Created as Apps -
  1. Custom Web Parts (remote pages that contain custom Web Parts)
  2. Event receivers and Feature receivers(remote event receivers)
  3. Custom field (column) types ()
  4. Custom web services built on the SharePoint Service Application Framework
  5. Application pages
  6. Cannot be created as Apps –
  1. Apps cannot call SharePoint server side code
  2. Apps cannot access SharePoint components that are not on the same site
  3. Apps cannot communicate with each other
  4. Custom site definitions
  5. Custom themes
  6. Custom action groups and custom action hiding
  7. User controls (.ascx files)
  8. Delegate controls
What Can be Created as Farm soltuion - You can deploy almost all the components as Farm solution.

Saturday, October 25, 2014

Jaitley is richest NDA minister, Sadananda Gowda's wealth is growing fastest

If wealth is health, Prime Minister Narendra Modi’s Council of Ministers is pretty much in the pink. Of the 44 members in Modi’s ministerial team, no less than 41 - or 91 per cent - are crorepatis. 

This compares rather favourably with the United Progressive Alliance II’s Council of Ministers, where 47 of 79 ministers - just about 60 per cent - were similarly wealthy. 

Union Finance and Defence Minister Arun Jaitley is the richest minister of the National Democratic Alliance (NDA) government, with assets totalling Rs 114.03 crore. 

It is Railway Minister D.V. Sadananda Gowda, however, whose assets have shown the greatest increase, rising by Rs 10.46 crore since he took over as minister. His wealth has shot from Rs 9.88 crore as declared in the Lok Sabha elections to Rs 20.35 crore now. 

The wealth of Modi’s ministers has been analysed by the Association for Democratic Reforms (ADR) and National Election Watch (NEW) by comparing the declarations filed for the Lok Sabha elections in May this year and those sent about five months later to the Prime Minister’s Office (PMO). 

Declarations of 45 ministers, including Modi himself, have been analysed. Of the 45 ministers, 37 had contested the Lok Sabha elections in 2014 and eight are members of the Rajya Sabha. Unlike the railway minister, Jaitley’s assets have shown an increase of Rs 1.01 crore in the same period. 

Jaitley’s assets rose in value from Rs 113.02 crore during the Lok Sabha polls to Rs 114.03 crore in the 2014 disclosure to the PMO. He is fond of luxury cars and has declared ownership of high-end cars like a Porsche worth Rs 1.02 crore, and vehicles from Mercedes Benz and BMW among others. 

Gowda’s growth is on the fast-track primarily because he has acquired a commercial building worth Rs 13.49 lakh as well as a residential building worth Rs 11.65 crore. 

Matter of assets 

The average value of assets of Modi’s Council of Ministers, according to the declarations on the PMO website, is Rs 14.32 crore. Following Jaitley on the rich list are Food Processing Minister Harsimrat Kaur Badal of the Shiromani Akali Dal (Rs 108.31 crore) and Minister of State (Independent Charge) for Power, Coal and New and New and Renewable Energy Piyush Goyal of the Bharatiya Janata Party (Rs 94.66 crore). 

According to the ADR, many Union ministers including Gowda, Dr Harsh Vardhan, Ananth Kumar, Jitendra Kumar, Manoj Sinha, and Santosh Kumar Gangwar have not declared the value of their agricultural land in their declarations. 

On the not-so-rich side, the least wealth has been declared by Sudarshan Bhagat of BJP (Rs 59.13 lakh) followed by Mansukhbhai Dhanjibhai Vasava of the BJP (Rs 65.71 lakh) and Ram Vilas Paswan of the Lok Janashakti Party (Rs 95.71 lakh).

Among the ministers who contested the Lok Sabha 2014 elections, the highest increase in assets in five months has been shown by D.V. Sadananda Gowda of the BJP (Cabinet Minister for Railways). Gowda is followed by Minister of State (Independent Charge) for Heavy Industries and Public Enterprises Radhakrishnan P. of the BJP, who has shown an increase of Rs 2.98 crore from the Rs 4.09 crore he declared in the Lok Sabha polls.

The reason for the increase in the property of many ministers, including Radhakrishnan P., has been difficult to evaluate as some ministers have not declared the values of their assets in a comprehensive format. 

The great dip 

There are 16 ministers whose wealth has shrunk in the jour- ney from the General Elections to the Council of Ministers. The greatest decrease is for Exter- nal Affairs Minister Sushma Swaraj whose wealth has fallen by Rs 3.89 crore (from Rs 17.55 crore to Rs 13.65 crore). 

She is followed by Minister of State (Independent Charge) for Development of North-eastern Region Gen. (Retd) V.K. Singh of BJP, who has declared a decrease of Rs 3.13 crore (from Rs 4.11 crore declared in the 2014 Lok Sabha elections to Rs 98.27 lakh declared in the disclosure to the PMO). 

The former Army chief is followed by Health and Family Welfare Minister Dr. Harsh Vardhan of BJP who has declared a decrease of Rs 1.28 crore (from Rs 2.82 crore declared in the 2014 Lok Sabha elections to Rs 1.54 crore in the disclosure to the PMO). 

The declaration of assets by the ministers has been made according to the Code of Conduct issued by the Ministry of Home Affairs which makes it mandatory for every minister to disclose details of their assets and liabilities. 

The 2009 Cabinet of the UPA had 47 crorepati ministers, of which 38 were from the Congress, five from the Dravida Munnetra Kazhagam, two from the Nationalist Congress Party, and one each from the National Conference and Trinamool Congress. 

NCP leader Praful Patel was the richest of the lot, with assets worth Rs 89.9 crore.

Saturday, October 18, 2014

How to enable RSS Feed

What is RSS?
Really Simple Syndication (RSS) is a widely used technology for transmitting information across the Internet and intranets. Many Web sites offer RSS Feeds you can subscribe to, so you can get the latest information from the source automatically.
You can also subscribe to RSS Feeds from SharePoint libraries, lists, and other elements, so you can see when someone adds a document or changes a list item.

How RSS can be consumed in SharePoint?

You can use an RSS Viewer Web Part to display an RSS Feed on a SharePoint site. RSS Feeds and the RSS Viewer Web Part provide you with a convenient way to view information from many sources on a single page. For example, by adding RSS Viewer Web Parts to your My Site page, you can view RSS Feeds from external sites that provide information such as news and weather reports. You can also keep track of changes in libraries, calendars, and lists on other SharePoint sites.
A Corporate Active Directory user can configure a RSS feed webpart to subscribe to any RSS feeds published inside and outside corporate network. Current scenario it is NOT possible to subscribe to an external RSS feed. This shortcoming calls for a need to enable internet access in the SharePoint web applications.
When a corporate Active Directory user subscribes to an external RSS feed, the feed aggregator will check the publishers site for any new content and then collects the information and represents it in the RSS feed webpart.
Current functionality will not be impacted in a negative way. More functionality will be available.  The traffic is routed through the proxy / firewall like all other internet traffic from clients. Any request to an external URL will be validated and verified by the existing firewall mechanism thus eliminating any potential risk to information or environment.
Logical Architecture
Implementation

Step 1: Browse to Internet Information Services (IIS) Manager

Step 2: Select the Web Application where the internet access is planned. Focus on the ‘Configuration Editor’ under ‘Management’

Step 3: Right click and select ‘Open Feature’

Step 4: Under ‘Configuration Editor’ Ã  ‘system.net’, select the ‘defaultProxy’ section.

Step 5: Under ‘Configuration Editor’, provide appropriate values for the attributes below.

For more help on the attributes below, please refer to 

Step 6: After providing all attribute values, try using the ‘Generate Script’. This functionality provides you with managed code and scripts that helps to perform all the steps explained here in an automated fashion in acceptance and production farms. Please also keep in mind about making changes in a multi server environment. You can find more information from the below article.

Note: You could skip further steps and start planning implementation step of your choice or continue further by making changes directly via the configuration editor.

Step 7: After providing all attribute values, please select ‘Apply’ from the menu from left side.

Step 8: Verify the web.config of your application and see if the changes are reflected.
Step 9: Add a RSS Viewer webpart on your SharePoint page and configure the webpart to consume an online RSS feed.

Wednesday, October 15, 2014

Introducing Query Rules

A Search Keyword works for the exact query 'image library' or 'picture library', while a Query Rule can improve search for a whole lot of different image queries.
Yet if all you want to do is promote results to the top for a query — worry not! It’s as easy with Query Rules as it was with Search Keywords. In fact, if you’re upgrading from SharePoint 2010 Products, SharePoint 2013 Preview transforms all your old Search Keywords into Query Rules for you.
So let’s create a Query Rule that fires on the exact query ‘image library’ or ‘picture library’, then promotes a result for the Image Library to the top of the page.
First, we’ll go to the Query Rules management page. On your search center’s upper-right-hand corner, click the gear icon, then select Site Settings.

Next, on the Site Settings page, under the Search heading, click Query Rules. Note that you may see a Search Query Rules link under Site Collection Administration. This happens if you’re the Site Collection administrator and the search center is the site collection’s root site. Don’t click that one; those Query Rules affect every site in the site collection, and for now we want to focus only on the search center site.

Now that you’re on the Query Rules page, the first question to ask is “Where will the user be?” For example, do you want to manage Query Rules for your main Enterprise Search? Or for People Search? Or Video Search? Each search experience, out-of-the-box or custom, can have its own Query Rules.
This is what we call the query’s context. You configure Query Rules for a particular context by using that first row of dropdowns in the Query Rules management page.
 
To manage Query Rules for a specific search experience, use the first dropdown to pick the Result Source for that experience. We’ll go into Result Sources in another post — for now, think of them as a SharePoint 2010 Federated Location plus a Search Scope. Each search experience sends queries to a Result Source, and that source guarantees results meeting certain conditions. For instance, People Search sends queries to the Local People Results source, which only returns People results.
We want our new Query Rule to fire on the main Enterprise Search. That search experience sends queries to the Local SharePoint Results source (which includes everything SharePoint crawls except People). So choose Local SharePoint Results from the first dropdown.
Next, click Add Rule to start creating your new rule.

Having picked a context, we just need to give the rule a name, then specify its conditions and actions. In other words, say when this rule will fire, and what it will do when it does. This is very similar to creating a Search Keyword in SharePoint 2010:
  1. Give the rule a name: Image Library.
  2. In the Query Conditions section, leave the condition type on “Query Matches Keyword Exactly”. In the textbox, type the queries we want to match, separated by semicolons: image library; picture library.
  3. In the Actions section, since we want to promote a result to the top of the page, click Add Promoted Result. These are just like Best Bets in SharePoint 2010.   
  4. In the Add Promoted Result dialog, fill out the title, URL, and description.
  5. Click Save in the dialog, then Save in the Add Query Rule page.
And that’s it…you’ve created a Query Rule! To try it out, go to your search center and search for ‘image library’ or ‘picture library’ (note that it can take a few seconds for the Query Rule to start working).

This Query Rule, while simple, demonstrates the high-level steps for creating all Query Rules.

  1. Pick the context (e.g., queries sent to the Local SharePoint Results source).
  2. Specify the conditions (e.g., fire if the query exactly matches ‘image library’ or ‘picture library’).
  3. Specify the actions (e.g., promote a result for the Image Library).

Monday, July 14, 2014

master page


1. Prepare your html design first.
2. Move styles,scripts and images to appropriate places in sharepoint
styles,scripts->style library
images->images

Default MasterPages:
======================
MOSS 2007-default.master
SP 2010-v4.master,minimal.master,default.master - will give 2007 user interface in 2010
SP2013-seattle.master, oslo.master

3. Adjust the styles, script and images links in html code
4. Open SharePoint Designer 2013->open site->give url
5. click on masterpages->copy seattle.master and paste
6. rename pasted file as hayathi.master
7. right click on hayathi.master->checkout->again right click->Edit file in advanced mode
8. find s4-workspace-> then below that find s4-bodyContainer and hide it by using style="display:none"
9. copy your html body code and paste in between s4-workspace and bodycontainer.
10. go to head and configure styles and scripts.
11. hide s4-ribbonrow style="display:none"
12. hide suitebar
13. find PlaceHolderMain contentplaceholder and cut and paste into your design,
where you want to have child page

Tuesday, July 8, 2014

STSADM Commands for Solutions and Features

STSADM Commands for Solutions and Features

Working with Solutions


stsadm –o addsolution –filename “D:\Deploy\MySharePointSolution.wsp
We used the following command to deploy the solution once installed to a specific web application:
stsadm –o deploysolution –name MySharePointSolution.wsp –url http://myspwebappp –allowgacdeployment –immediate
If we would upgrade an existing solution, we would use the following:
stsadm –o upgradesolution –name MySharePointSolution.wsp –filename “D:\Deploy\MySharePointSolution.wsp” -immediate
And finally, we used the following commands to retract and delete a specific solution from the web application:
stsadm –o retractsolution –name MySharePointSolution.wsp –url http://myspwebapp –immediate
stsadm –o deletesolution –name MySharePointSolution.wsp
Now, let us see how we could do above operations with PowerShell. For this, we use the following PowerShell commands:
Add-SPSolution “D:\Deploy\MySharePointSolution.wsp
Install-SPSolution –Identity MySharePointSolution.wsp –WebApplication http://myspwebapp–GACDeployment
If you would like to add the solution as sandboxed, you would use the Install-SPUserSolution command instead. To upgrade a solution, we specify which solution is to be updated and with which new solution file:
Update-SPSolution –Identity MySharePointSolution.wsp –LiteralPath “D:\Deploy\MySharePointSolution.wsp” –GacDeployment
To retract and remove a solution, we use the following commands:
Uninstall-SPSolution –Identity MySharePointSolution.wsp –WebApplicationhttp://myspwebapp
Remove-SPSolution–Identity MySharePointSolution.wsp

Working with features

Similarly, commands exist for working with features. The stsadm equivalents:
stsadm –o activatefeature –name MyFeatureName –url http://myspwebapp
stsadm –o deactivatefeature –name MyFeatureName –url http://myspwebapp
Needless to say, there are easy equivalents in PowerShell:
Enable-SPFeature –Identity MyFeatureNameOrGuid –url http://myspwebapp
Disable-SPFeature –Identity MyFeatureNameOrGuid –url http://myspwebapp

Monday, July 7, 2014

Configure external site as content sources in sharepoint search

Configure external site as content sources in sharepoint search:

We can search the external sites content using the SharePoint search just by creating new content source. Follow below steps:
  1. On the Home page of the SharePoint Central Administration Web site, in theApplication Management section, click Manage service applications.
  2. On the Manage Service Applications page, click Search Service Application.
  3. On the Search Administration Page, in the Crawling section, click Content Sources.

                    

After clicking on the link you will be redirected to the page where all the available content sources are displayed.

                   

To create a content source

  1. On the Manage Content Sources page, click New Content Source.
  2. On the Add Content Source page, in the Name section, in the Name box, type a name for the new content source as “External Sites”.
  3. In the Content Source Type section, select the “Web Sites”.
  4. In the Start Addresses section, in the Type start addresses below (one per line)box, type the URLs from which the crawler should begin crawling. For example:http://example.internetsite.com
  5. In the Crawl Settings section, select “Only crawl within the server of each start address”.
  6. In the Crawl Schedules section, to specify a schedule for full crawls, select a defined schedule from the Full Crawl list. A full crawl crawls all content that is specified by the content source, regardless of whether the content has changed. To define a full crawl schedule, click Create schedule.
  7. To specify a schedule for incremental crawls, select a defined schedule from theIncremental Crawl list. An incremental crawl crawls content that is specified by the content source that has changed since the last crawl. To define a schedule, clickCreate schedule.You can change a defined schedule by clicking Edit schedule.
  8. To prioritize this content source, in the Content Source Priority section, on thePriority list, select Normal or High.
  9. To immediately begin a full crawl, in the Start Full Crawl section, select the Start full crawl of this content source check box, and then click OK.
                       
This finishes creation of the new content source for external sites. But not all the internet facing sites allows anonymous access to its content. So there must be some place where we can configure the rules for the Urls which allows us to enter the credentials to access the content of site while crowing.
So navigate to Search Service Application > Crawl rules.
Click on the option “New Crawl Rule”
         
Path: Mention the internet site Url under the path section.
Crawl configuration: Select the “Include all items in this path” option.
Specify Authentication: Select “Specify a different content access account”. Enter the site credentials.
                     
Click Ok.
Next and last step is to crawl the content source “External Sites”. This will allow SharePoint can crawl the external site content

Wednesday, July 2, 2014

Limitations of Sandboxed Solutions in SharePoint 2010



- Since Sandboxed solutions are site collection specific, so you can not access data from other site collections. You can only access resources within the same site collection.

- You can not use SPSecurity.RunWithElevatedPrivileges method in case of Sandboxed solution.

- Executing code within Sandboxed solution causes a little performance overhead. Also Sandbox worker processes are terminated if they run for more than 30 seconds.

- Logging functionality is unavailable within the sandbox environment. Sandboxed solutions cannot write entries to the Windows Event log or the Unified Logging Service (ULS) trace log. 

- You cannot read configuration settings from or write configuration settings to the Web.config file.

- You can store and retrieve settings in the SPWeb.AllProperties hash table, but you cannot use property bags at any level of the SharePoint hierarchy.

- You cannot read or write settings to the hierarchical object store, because you do not have access to an SPWebApplication object or an SPFarm object.

- You can read or write settings to a SharePoint list within the same site collection not to other site collection.

- In case of deployment you can not deploy any files to the server file system in Sandboxed solutions.

Friday, June 27, 2014

Site definition

What is Site Definition?

A set of predefined components needs to be included when a site was created in the SharePoint server. The site definition contains the information of Web parts, Lists, Features, and Navigation Bars to be included in the site. 

Site Definition:
By default SharePoint comes with several OOB site definitions which you can select to create your site. In the file system these definitions are available in C:\Program Files\Common Files\Microsoft Shared\web server extensions\15\TEMPLATE\SiteTemplates. 
Each of this site definition consists a XML folder and a Home page (default.aspx). Some of the site definition will be having some more details about the definition which we will walkthrough in more detail later. 
The XML folder of the site definition contains the ONET.XML (Office .NET) file. This file contains the information about all the web parts, Lists, Features and Navigation Bars. 
The configuration of this site definitions are defined in another XML file which is available in C:\Program Files\Common Files\Microsoft Shared\web server extensions\15\TEMPLATE\1033\XML folder.
Following is the detail of the XML configuration file and the respective site definitions


Sunday, June 22, 2014

List Definition in SharePoint 2013

In this article you will learn how to develop List Definition in SharePoint 2013 using declarative approach with the help of Visual Studio.

Develop:

1.       Open Visual Studio 2012 or 2013.
2.       Click File – [New] – [Project]  - SharePoint solutions.
3.       Select SharePoint 2013 – Empty Project template.
4.       Name the project “SharePointProject_ListDefinition” or name as you like :).
5.       Enter the site you want to debug and select Farm solution.
6.       Always create folder for grouping any similar artifacts like Site Columns, Content Types and Lists etc. In this case even though its only one I will create a folder called Lists.
a.       To create a new folder, Right click on the project - [Add] – [New Folder], name it as Lists.
7.       We are into actual step now creating List definition.
  •  Right click on Lists folder –[Add]-[New Item]- [List]  name it as “CustomerListDefinition”.
  •  Click on Finish in the wizard.
  •  Add the columns / content types if you have any. Once you are done save all.
  •  We need only list definition so go ahead and delete the list instance.
8. Open the elements.xml under CustomerListdefinition.
1234567891011121314
xmlns="http://schemas.microsoft.com/sharepoint/">
Name="CustomerListDefinition"
Type="10000"
BaseType="0"
OnQuickLaunch="TRUE"
SecurityBits="11"
Sequence="410"
DisplayName="CustomerListDefinition"
Description="My List Definition"
Image="/_layouts/15/images/itgen.png"/>
view rawElements.xml hosted with ❤ by GitHub
You can observe that Type will always starts with 10000 to make sure that this will not conflict with the OOB types.

Deploy:

9.       If you want to activate the feature manually go to Project properties - select sharepoint –Set Active deployment configuration to “No Activation”.
10.       Right click on project to deploy the solution. Always keep an eye on Output window in visual studio to know what is happening behind the scenes.
11.       Go to [Site settings]-[Manage site features under Site Actions]- activate your feature, here “SharePointProject_ListDefinition Feature1”.

Testing:

12.       To see your list definition click on [Site content] – [Add an app] there you can see your “CustomerListdefinition”
Using this you can create as many lists you wish :).

Conclusion:

With the help of Visual Studio 2012 and later versions developing list definition becomes easier compared to previous versions.
- See more at: http://www.sharepoint-journey.com/List-Definition-in-sharepoint-2013-using-declarative-approach.html#sthash.xeJ6RueC.dpuf