SharePoint4us

Explore the Experience in SharePoint 2013

Tuesday, November 17, 2015

How to Enable SharePoint Designer quickly in SharePoint 2013

No comments

Hi friends,

In this post we can explore how to enable SharePoint Designer for a site collection.

SharePoint Designer

SharePoint Designer can be locked due to multiple reasons. But, SharePoint Designer is required to customize pages, create custom workflows & lot of other quick tasks.

If you are the Site Collection Administrator, you can enable SharePoint Designer as following.

Open Site Settings Gear > Site Contents menu item.


Why do we use Appsettings in Web.Config file ?

No comments

Hi Friends,

ASP.NET provides a configuration system we can use to keep our applications flexible at runtime. In this article we will examine some tips and best practices for using the configuration system for the best results.

The <appSettings> element of a web.config file is a place to store connection strings, server names, file paths, and other miscellaneous settings needed by an application to perform work. The items inside appSettings are items that need to be configurable depending upon the environment, for instance, any database connection strings will change as you move your application from a testing and staging server into production.

As an example, let’s examine this minimal web.config with an appSetting entry to hold our connection string:



Some applications will duplicate these lines of code in many places. If we think about how the above code will evolve over time, we might see a handful of weaknesses. First, we have a hard coded string in place to fetch connection information from the web.config. Hard coded strings can be easy to mistype and difficult to track down if the key ever changes. Secondly, the code will tie us forever to the appSettings section of the web.config file. Although web.config is designed for just such a setting, we might find in the future that we need to pull configuration settings from a database, or change a setting from being application-wide to being a per-user configuration item kept in the Session or in a cookie.


Item Level Permissions in SharePoint 2013

1 comment

Hi friends,


In this article we can explore a common scenario which can be solved using OOB feature of SharePoint 2013.

Scenario

You have a list to track expense claims. Multiple employees are using the same list. Following are the challenges:
1. Employees should see only their items
2. Employees should not be able to edit other employee’s items

Solution
Although using “views” will be the first solution in mind, we can solve this through OOB way using:
· List Item Level Permissions

Steps

Create an Expense list as shown below.









Save changes & test it out in following way
1. Create 2 users
2. Use 2 browsers
3. Add one expense-item for each user
4. You can see user-1 can see only his/her item
5. Same applies to editing as well

When user 1 logs in:



Tuesday, June 23, 2015

What is Developer Dash Board and how to enable in SharePoint 2013 easily

2 comments
Hi friends,

Thanks for visiting my blog..

Today in this Post  , I  would like to explain about

                "How to enable Developer Dash Board in SharePoint 2013 ?"

  1.  What is Developer Dash Bord and  use of it?
  2.  How to enable to your site and check it ?
  3.   How many ways to Enable DDB ?


Developer Dash Bord and  its usage in SharePoint.

  The developer dashboard is a new feature in SharePoint 2010 that is design to provide additional performance and tracing information that can be used to debug and troubleshoot issues with page rendering time.  The dashboard is turned off by default, but can be enabled via the object model or stsadm (and PowerShell too, I just haven’t put together the script for it yet).  When the dashboard is turned on you will find information about the controls, queries and execution time that occur as part of the page rendering process; this information appears at the bottom of the page in SP 2010.


How many ways to Enable DDB ?

we can enable via three different ways

1. Object Model
2. Power Shell
3. STSADM Commands.


Enabling the Developer DashBoard in SharePoint 2013 using STS ADM Command
  • -Open  "Windows +R" -->CMD
  •  Goto the Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\BIN"
  • Paste this command "stsadm -o setproperty -pn developer-dashboard -pv ondemand"
  • -Once this Command is executed ...Please go to your site and check ,you can able to see small icon on the right top side of the master page.
  •  It  diplays a page with all the details of the current page .





Tuesday, May 26, 2015

What are the new features in SharePoint 2013 compared to SharePoint 2010

No comments

Hi Friends,

Thanks for visiting my blog...

In this i would like to describe about  SharePoint 2013 newly introduced  features.


Microsoft thinking beyond 2013
Microsoft is happy about SharePoint 2013 to get a better understanding of what’s new. In developing the product, it has taken care of the main obstacles for organisations deploying the 2010 version. SP2013 is specially designed keeping in mind app scalability for large business enterprises. It has been targeting all knds of business sectors with its new features and functionalities.
Comparison with SharePoint 2010:
  • No Internet Explorer 7 support.
  • With the purchase of Yammer, there is more emphasis on social media.
  • Licensing: Internet sites no longer require an expensive licence, the cheaper standard server licence means that customers can host their internet and intranet on the same platform, reducing costs and providing more flexibility.
  • Records and document management: no real change.
  • Greater adoption of internet and open standards, enabling broader device support and integration with other services.
  • Users can have SharePoint on premise, in the cloud, or a hybrid of both.
  • The core ‘Search’ capability, based on FAST technology, is much richer.
Striking Features of SharePoint2013 which makes it stand apart:
Support for mobile devices
Mobility adoption is increasing within organizations and it is the topmost trend. The new version of SharePoint offers a rich platform for mobile development. Contemporary view which is HTML coded view provides a quick access across various mobile platforms like iPhone, Android, and Blackberry.
Improved BI Capabilities
SharePoint 2013 offers extended capabilities to generate business intelligence reports. Its ability to provide big data reports and BI solutions has been expanded with the new version. Also, the integration between SharePoint and Excel has also been improved for a smooth functioning. It offers a better Power Pivot program that makes it possible to work with plenty of rows and columns in memory, making it convenient for use. It is used to generate extensive reports that reflect the organizations growth and provides insights into the business.
Cloud reality
SharePoint 2013 is geared for the cloud, which is great, but there are still a few things to watch for. Cloud apps reduce infrastructure costs and risks. Now users can spend more time in quality management and performance improvement. With this new version, it is easy for the users to keep a track of updated technologies. Now you can deal with complex and long programs quickly.
On premise
Running SharePoint onsite means that one can add more functionality or have better integration with other line of business systems. It also means that it has more flexibility over compliance features such as Public Records Act requirements.
Private cloud
Using a private cloud means that one can have predictable bandwidth and performance, but it also means that storage and disaster recovery costs are more obvious. This means that one can have a clear separation between infrastructure and application administration.
Search
Search on SharePoint 2013 is a real highlight. It is much richer than internet or Google-type results.Italso provides a facility wherein it is possible to view the outline of a document while scanning through the search results. And the fact that Search has now been integrated with the ‘Term Store’, which helps standardise company language across documents, means one can now refine search results even more. Other great features include the ability to preview content whenever its hovered, meaning that one can preview a PowerPoint presentation without opening it. The ‘bad’ is that Search requires more server resources and requires an enterprise licence for certain advanced Search features.
New content features
The ability to drag and drop files into a webpage
  • End users can “share” files with others more simply
  • Better developer support
  • New database storage reduces the overhead of versioned documents
  • With Office Web Apps one can now edit documents on iOS devices
  • Much more flexibility around images
  • Video support improvements.
Infrastructure management
You can now take a more flexible approach to infrastructure management with SharePoint 2013. This means that you can take a hybrid on-premise and cloud approach. This is great for small to medium businesses that might not have the beefy bandwidth that you would need to run SharePoint completely over the internet, but by purchasing “Apps” hosted in the cloud these “Apps” will appear to be running on your server.
There are some technical traps to be aware of however:
  • Most customers will want to virtualise the SharePoint servers but they are resource intensive so should not be run on over committed hosts
  • Beware of remote access requirements, which can cause slow access
  • There’s no need to keep scanned and read-only files in SharePoint – it’s an expensive form of storage – it’s better to have a link to these resources in SharePoint
  • Don’t underestimate the technical skills that SharePoint needs.
  • Some of the SharePoint features require that other infrastructure and client components are all on the 2013 version. Fortunately SharePoint 2013 still allows to run 2010 sites, which means that one can leverage some new features like search, while continuing to use 2010 document libraries for Office 2010 users. This ability to run both in parallel is a key feature introduced in 2013 to help reduce the upgrade pain.
The new version SharePoint 2013 customizations helps control and manage all the different aspects of the web portals in a splendid way. SharePoint webparts enables to add dynamic functionality to the site, and enables to create different layouts for the mobile platform. Microsoft has already started receiving good vibes about SharePoint 2013 because businesses have started adopting to the new version. Custom SharePoint development teams are can help you migrate from older versions of SharePoint to SP2013 within allocated budgets and time schedules.

Introduction to Workflows in SharePoint 2013

No comments


Hi friends,

Thanks for visiting my blog.


In this Post i would like to describe about "SharePoint Workflows".

  •   Introduction to workflows.
  • .Why we need Workflow?
  •  Common Workflow Scenario.
  •  Reusable and Non-Reusable Workflows.
  •  Typical Workflow Usage in SharePoint
  • Designer, Visio and Visual Studio
  • Declarative & Compiled Workflows
  •  Out of the Box Workflows

 Introduction to workflows.

            Workflows help people to collaborate on documents and to manage project tasks by implementing business processes on documents and items in a Microsoft Office SharePoint Server 2007 site. Workflows help organizations to adhere to consistent business processes, and they also improve organizational efficiency and productivity by managing the tasks and steps involved in business processes. This enables the people who perform these tasks to concentrate on performing the work rather than managing the workflow.

                                        



Why we need Workflow?

Workflow provides a convenient way to automate manual business processes.
The activities in the Workflow can be represented in a graphical manner and adds great flexibility to a developer and non-developer. Using Workflow we can easily achieve the branching, cases and executions in an easier manner


Common Workflow Scenario
We can apply Workflow for the following scenarios.

Scenario 1: A task list allows creation of task for users. Whenever a new task is created in the list, we need to notify the user associated with it. We can use Workflow to accomplish this easily.

Scenario 2: A company consists of developers with various skill sets. There is a set of Training Items. Each developer can apply for the training. The application will be notified to the Training Manager. He can check the skill set and approve or reject the applicant. If selected, the applicant can attend the training. On completion of training there is a verification exam to be undergone by the attendee. If he passes then Certificate is issued else the notification through email is done. We can use Workflow to accomplish this easily.

Scenario 3: People upload their expense reports into a Document Library. The library captures the expense as a separate field. Every week manager has to change status to Approved for the expenses with less than $ 500. The list contains hundreds of entries. The status updation can be done using Workflow in just 1 minute.

Scenario 4: Client can create a bug and it should be notified to Developer through email. Developer on completion of the bug fix changes the status and the Client gets notified. This whole process can be done through Workflow in an easier manner.

Reusable and Non-Reusable Workflows

In the case of SharePoint 2007 the workflow created for one list cannot be used for another list. But in SharePoint 2010.2013  the same workflow can be applied for multiple lists and thus making it Reusable. We can create reusable workflows using SharePoint Designer 2010,2013


Typical Workflow Usage in SharePoint
  • Developer creates the Workflow.
  • Administrator deploys the Workflow
  • Site Users use the Workflow.



Designer, Visio and Visual Studio

The SharePoint Designer provides an easier way for Administrators and Developers to create Workflows. Along with Microsoft Visio, Designer provides much more flexibility and features in Workflow creation.
Using Visual Studio developers can write more complex programming tasks with Workflow. Using the SharePoint extensions for Visual Studio, the inbuilt templates provide easier Workflow creation and deployment.
Declarative & Compiled Workflows

The workflows created using SharePoint Designer are known as Declarative workflows.

The workflows containing code and contained inside DLL files are known as Compiled workflows. They are usually created using Visual Studio 2010. 


Workflow Creators
·         A workflow can be created by:
·         Administrator
·         Developer
·         Power User
·          
Workflow Association
·         A workflow can be associated with the following:
·         Content Type
·         List / Library
·         Site


This makes easier to understand that a Workflow can be started manually or automatically.
Workflow Forms

Following are the types of forms associated with workflow:

1. Initiation Forms are shown to user when they start a workflow. The initiation form is used to capture parameters associated with a workflow.

Examples of parameters include Receiver Email list, Maximum Amount etc.

2. Association Forms are used to associate a workflow with a particular list or content type. The association form is by the Administrator.

In reality the Initiation form can be the same as Association form. The user can override the Association form settings using the Initiation form.

We can provide custom Initiation & Association forms using InfoPath as well.

                          Out of the Box Workflows

Following are the Out of the Box Workflows in SharePoint 2010:

·         Three-state
·         Disposition Approval
·         Collect Signatures
·         Collect Feedback
·         Approval





   


Easily Upload Document to Doc Library using Client Object Model in SharePoint 2013,SharePoint 2010

No comments


Hi friends,

Thanks for visiting my blog .

In this post i would like to post about how to upload a document to Document Library using 
Client Object Model 

Please find below method to upload the document to  Doc Library in SharePoint .

  1. public Boolean UploadDocument(String fileName, String filePath, List metaDataList)   
  2. {  
  3.     SP.ClientContext ctx = new SP.ClientContext(“http: //yoursharepointURL”);  
  4.     Web web = ctx.Web;  
  5.     FileCreationInformation newFile = new FileCreationInformation();  
  6.     newFile.Content = System.IO.File.ReadAllBytes(@”C: \TestFile.doc”);  
  7.     newFile.Url = “ / ” + fileName;  
  8.     List docs = web.Lists.GetByTitle(“Shared Documents”);  
  9.     Microsoft.SharePoint.Client.File uploadFile = docs.RootFolder.Files.Add(newFile);  
  10.     context.Load(uploadFile);  
  11.     context.ExecuteQuery();  
  12.     SPClient.ListItem item = uploadFile.ListItemAllFields;  
  13.     //Set the metadata  
  14.     string docTitle = string.Empty;  
  15.     item[“Title”] = docTitle;  
  16.     item.Update();  
  17.     context.ExecuteQuery();  
  18. }


Thanks 


Monday, April 27, 2015

How to get multiple users from SharePoint list Pragmatically in SharePoint 2013,2010?

No comments

Hi friends,

Thanks for visiting my blog .

In this post, i would like to describe about "Getting multiple users from SharePoint list Programatically".

Scenario : 
I came across a situation where i want to fetch the usernames and email IDs   from list (Column is people Picker and Check the "allow multiple users" option).

Solution : 

Please find the the below code snippet
*********************************

 SPFieldUser UsersColumn = (SPFieldUser)lstNewPrsReq.Fields.GetField("ColumnName");
 SPFieldUserValueCollection Users = (SPFieldUserValueCollection)UsersColumn.GetFieldValue(lstitemCollection[0]["ColumnName"].ToString());   
   if (Users != null)
     {                                 
  foreach (SPFieldUserValue user in Users)
               {
                        SPUser spUser = user.User;                    
                        if (spUser != null)                                               
                        strCCEmail = strCCEmail + ";" + spUser.Email;
                }                                                                           
          strCCEmail = strCCEmail.TrimStart(';');                             
     }      


strCCEmail : This string contains all the mail ids of the users for that particular list item.

hope this blog helps you........

Friday, April 24, 2015

Disabling the Throttling Limit to Specific List in SharePoint 2013, 2010

No comments


Hi friends,

Thanks for visiting my blog .

In this post, i would like to describe about "Disable throttling of List in SharePoint".

Scenario : 
I came across a situation where i want to fetch the list items  from list (consists of more than 2 lakhs).

Problem :
 when am pulling the items from the list it showing an error saying that you cannot pull items from list as it exceeds list threshold limit (by default 5000 in central administration  we can see the limit and increase but increasing here is not a good practice ).

Solution : 
we can disable  throttling limit  for particular list in which you want to query the items.
we can do this  by using powershell and object model to my knowledge.


PowerShell Script :
****************************
$web = Get-SPWeb "Site Url"
$list = $web.Lists["ListUrl"]
$list.EnableThrottling = $false
****************************

Paste in notepad and save as ".ps1 " .
1.Open the Management Powershell command prompt (run as administrator).
                 2. Execute the .ps1 file here.
                 3. Go back to the logic and try to query the list items .


Thank you hope this post helps you in understanding 

Friday, March 20, 2015

what is stored procedure and how to write and execute a Stored Procedure in SQL Server ?

No comments


Hi Friends,

Thanks for visiting my posts,

In this Post , i would like to post about stored procedure in SQL Server.

1.What is stored procedure ?
2. How to Create a stored procedure ?
3. How to Execute a stored procedure ?


 stored procedure 

A stored procedure is a group of sql statements that has been created and stored in the database. Stored procedure will accept input parameters so that a single procedure can be used over the network by several clients using different input data. Stored procedure will reduce network traffic and increase the performance. If we modify stored procedure all the clients will get the updated stored procedure.


 How to Create a stored procedure ?

1. Open Run-->SSMS( SQL Management Studio will get open).

2.   Select the Database and Select the Table on which  you want to write the   
        SP(store Procedure).

3.     In  our case , Database is SAMPLED and Table name is EmpData.
                   


4.    Put Some data into the table.

    
5.    Select New Query  from the ribbon.

 6 . The above screen tells that we have created a SP for  retrieving the table data .

 7 . After creating the Stored Procedure  click on "Execute" in the Ribbon.



How to execute a stored procedure ?

        
 1.  EXEC SP_Name  and execute , you will fetch the data from table 
 



 This is how we create a stored procedure and
  executes a stored procedure.






Advantages of using stored procedures

a)    a) Stored procedure allows modular programming. 

You can create the procedure once, store it in the database, and call it any number of times in your program. 

b)    b) Stored Procedure allows faster execution. 

If the operation requires a large amount of SQL code is performed repetitively, stored procedures can be faster. They are parsed and optimized when they are first executed, and a compiled version of the stored procedure remains in memory cache for later use. This means the stored procedure does not need to be reparsed and reoptimized with each use resulting in much faster execution times. 

c)     c) Stored Procedure can reduce network traffic. 

An operation requiring hundreds of lines of Transact-SQL code can be performed through a single statement that executes the code in a procedure, rather than by sending hundreds of lines of code over the network.

d)    d) Stored procedures provide better security to your data

Users can be granted permission to execute a stored procedure even if they do not have permission to execute the procedure's statements directly.

In SQL we are having different types of stored procedures are there

a)    System Stored Procedures
b)    User Defined Stored procedures
c)    Extended Stored Procedures

System Stored Procedures:

System stored procedures are stored in the master database and these are starts with a sp_ prefix. These procedures can be used to perform variety of tasks to support sql server functions for external application calls in the system tables 

Ex: sp_helptext [StoredProcedure_Name]

User Defined Stored Procedures:

User Defined stored procedures are usually stored in a user database and are typically designed to complete the tasks in the user database. While coding these procedures don’t use sp_ prefix because if we use the sp_ prefix first it will check master database then it comes to user defined database

Extended Stored Procedures:

Extended stored procedures are the procedures that call functions from DLL files. Now a day’s extended stored procedures are depreciated for that reason it would be better to avoid using of Extended Stored procedures. 


Hope this blog helps you.....