Thursday, December 18, 2014

Monday, July 22, 2013

Overview Of JQuery in SharePoint 2010

          I spent one week to play with JQuery language in SharePoint 2010 environment. Initially it was boring because it is not related to  intellisense code snippets or auto completion. After that i found that it is a curious language.In this article, I am going to explore valid vital points about JQuery in SharePoint 2010. This article will be very useful for beginners, inter-mediator and experts.

What is JQuery?
         JQuery is a concise and advanced version of Java script library. It simplifies the HTML document elements transitions, events, animations and ajax interactions. No need to install at server level, we can use it at anywhere in SharePoint environment. We simply can say about JQuery that "Write Less, Do more".

Advantage of JQuery in SharePoint

  1. It Reduces the Brain storm work in SharePoint deployment.
  2. It is a lightweight language means that Do not increase the page size when page load. Page load will be faster than ASP.Net and Ajax controls.
  3. It is a fastest Language with high performance.
  4. It is a open source language.
  5. It is not a case sensitive language.
keep on update....

Change Date format to ddMMyyyy to entire SharePoint site 2010

By default, SharePoint 2010 site date format will be MMDDYYYY. follow below instructions to change the date format to indian format (ddMMyyyy).

1. Go to Site Actions->Site Settings->Regional Settings then set it as below screen shot.

Click on "OK" button. Now date format will be changed in your entire site collection.

Saturday, October 20, 2012

How to Deploy wsp in SharePoint 2010 using PowerShell

Overview
In SharePoint 2010, STSADM command is supported but PowerShell commands are recommended to use. PowerShell command is powerful and extensible. It is not case sensitive but i suggest to use Caml Case format for good practice. It is used to deploy solutions/features in SharePoint 2010 environment.

Format of the PowerShell command
Basically Powershell coammands are built with Verb, Hyphen -) and Noun syntax. So Powershell command has two parts which are:
  1. Verb
  2. Noun
Example: Execute below command in Powershell window to add the wsp solution file
              Add-SPSolution "D:\\Filename.wsp"
Here, Add is a Verb and SPSolution is a Noun with Hyphen(-). i hope that you can understand it.

Solution Deployment
There are eight steps involved in SharePoint 2010 deployment those are:
  1. Deactivate Features
  2. Uninstall Features
  3. Retract Solution
  4. Delete Solution
  5. Add Solution
  6. Deploy Solution
  7. Install Features
  8. Activate Features
Example:  Change solution name , SolutionPath and HostName.

$solutionName="TestWP.wsp"
$SolutionPath="D:\\WebParts\TestWP.wsp"
Write-Host 'Going to disable feature'
disable-spfeature -identity TestWPFeature -confirm:$false -url http://HostName:1111
Write-Host 'Going to uninstall feature'
uninstall-spfeature -identity TestWPFeature -confirm:$false -force
Write-Host 'Going to uninstall solution'
Uninstall-SPSolution -identity $solutionName  -allwebapplications -confirm:$false

Write-Host 'Going to remove solution'
Remove-SPSolution –entity $solutionName -confirm:$false
Write-Host 'Going to add solution'
Add-SPSolution $SolutionPath
Write-Host 'Going to install solution to all web applications'
Install-SPSolution –entity $solutionName –Allwebapplications –GACDeployment

Write-Host 'Going to enable Feature' 
Enable-spfeature -identity TestWPFeature -confirm:$false -url http://HostName:1111 

Save above script as a filename "deploySolutionScript.ps1" and save below script as bat file named "RunDeployment.bat" then double click on bat file which will deploy the solution.
cd /d %~dp0
powershell -noexit -file    "\DeploySolutionScript.ps1" "%CD%"

Note: Make sure that all the files should be placed inside a folder.

Conclusion
Powershell script is easy way to deploy your custom solutions/Features into SharePoint platform. Powershell also supports SharePoint Programming features. So you can do all kind of SharePoint programs. Powershell script's Basic knowledge must for SharePoint developers.

Thursday, January 26, 2012

Cancel the LongRunningOperationJob in SharePoint 2007 when click on Cancel button

About  LongRunningOperationJob: 

              In SharePoint, Microsoft.SharePoint.Publishing.Internal provides "LongRunningOperationJob" class which prevents the timeout issue and used when long running operations(example: insert/update data in database at button submit event if its taking long time). It needs to activate the publishing feature : in SharePoint site , go to SiteActions->SiteSettings-> under "Site Collection Administration" click on "Site collection features"->Office SharePoint Server Enterprise Site Collection features.
 
Issue Faced:

              In SharePoint 2007, i am uploading excel file with large data and reading data from excel file then inserting data into DB. in this case i am using "LongRunningOperationJob" class in aspx page, successfuly its uploaded. but user wants to cancel this upload operation while uploading. i used "UserCanCancel = true;" Cancel button is enabled, but it is not cancelled the uploading process when user hit the Cancel button..how to cancel it when hit the cancel button?.

Anwser :
                i found the solution after did some analyzation,  "LongRunningOperationjob" class contains a property named "UserRequestedCancel" which can stop the uploading process using below lines.

Code:

            for (int i = 0; i <= worksheet.Cells.LastRowIndex; i++)
              {
                    if (!this.UserRequestedCancel)
                    {
                        this.StatusDescription = "Record " + (i + 1).ToString() + " is under proccess...";
                        this.UpdateStatus();
                        this.OperationsPerformed++;
                    }
                   else
                       break;
              }

by default UserRequestedCancel will be false. once clicked on Cancel button UserRequestedCancel will be true.





Friday, February 18, 2011

What is SharePoint?

SharePoint is set of products and technologies with informative and collaborative webbased capabilities that help people can create, distribute and maintain stored knowlwdge.
* Used to create internet and intranet portals,Teamsite and public facing internet sites.
* It is a webbased platform to build business applications to store, share, team collaboration and manage.
* SharePoint is a secure,reliable,capable platform for developing enterprise webapplications.
* It provides Application Programming Interface(API).

SharePoint Concepts:
1. Sites and Workspaces
2. Lists
3. Document Library
4. Content Types
5. WebParts
6. Workflow
7. Enterprise features such as Search, Business Data Catalog, Reporting services, Excel services and Form services.