Showing posts with label SharePoint 2010. Show all posts
Showing posts with label SharePoint 2010. Show all posts

SharePoint workflow form blank on IE

This is one of the weird issue I faced while creating an out of the box workflow.

Business had a web application where they wanted to create simple approval workflow on a SharePoint 2013 site collection. Nothing complicated, but it turned out to be a difficult task.

After creating the workflow the workflow forms were coming as BLANK. No error on screen or in the logs, just a page with header, left nav and footer, but nothing in between :((

We did some analysis and found that none of the workflow forms were working. But the same workflow forms worked on another web application on same farm. So it was clear that nothing was wrong at farm level.

Finally opened a case with Microsoft and even they were not able to help out. There suggestion was to delete the web-application and restore it using content DB. As per them the web application was not created correctly, even though we shared the auto sp installer script used to create it.

But a little bit more analysis gave a clue. It turned out that the same forms on same web application when opened in Chrome worked.

So essentially it was an IE issue. We found that there is a security feature in IE that blocks any forms on the links that has with underscore "_". This only happens when the first you have _ in the first part of the link, like web application name or server name.

But unfortunately you wont get enough articles around it. Here is what I have found , hope it will be helpful.

And the only solution Microsoft suggests now is change the URL for the webapplication :(

Create SharePoint user profiles using powershell

I have been recently asked to create thousands of user profiles in our test environment.

Ideally importing profiles from AD or provisioning the profiles is advisable, but due to nature of our test environment it was not possible. After searching a bit, I found a script and modified it for this purpose. The script requires all the profile related data to be stored in a CSV.

#Add-PSSnapin if not added already using this link 

$portalsite = "http://spportal"
$portalcontext = Get-SPServiceContext -Site $portalsite


$upm = New-Object -TypeName Microsoft.Office.Server.UserProfiles.UserProfileManager -ArgumentList $portalcontext
$userslist = Import-Csv -Path "userprofilelist.csv"

#Loop through all the rows of csv

for($count=0; $count -lt $userslist.Count; $count++)
{

#Create new User Profile
$upm.CreateUserProfile($userslist[$count].UserName)
$profileproperty = $upm.GetUserProfile($userslist[$count].UserName)

#Custom User Profile being updated for the user
$profileproperty["property1"].Value = $userslist[$count].Property1
$profileproperty["property2"].Value = $userslist[$count].Property2
$profileproperty["property3"].Value = $userslist[$count].Property3
$profileproperty.Commit()

}

Hope this helps. Please see my other scripts to export the data to CSV.

Error While creating new list - Silverlight error


Recently after creating a new Site collection, users reported that they can not create a new list/document library in the Site collection. The error is as displayed below:

 

After verifying that it had nothing to do with Silverlight of list templates, I figured out that one of the setting in web application is causing this.You can change the setting as shown below to get rid of this problem.




Once these steps are followed you should be able to create new list without any issue.

Site and Site Collections

Users are often encountered with questions or statements like:

1.       Do you want a site or a site collection?
    2.       The functionality has to be enabled at Site collection level
    3.       This feature is not available at site level

Site collection and Sites are both containers that store your data. The major difference is Sites can only be created under a Site collection. So in a way Site Collections are parent to Sites.
Due to the above relationship, Sites can and do inherit a lot of features from Site collections but at the same time there are a lot of differences between the two. Web application are one level above site collections. The figure below shows the relationship.


 
 
 
There are many differences between Sites and Site collections like:

·         You can apply quota to Site Collection but can not do it for site
    ·         Search settings can be better managed at Site collections
    ·         URL for Site collections can be more flexible using managed path

You can also create subsites under the sites. Sites are generally used for grouping the content within Site collection and same way subsites can be used to group the content within Sites.
You should consider following scenarios while choosing between site and site collection :

1.       Size – If your data is going to grow large, consider having a site collection. Sites sometimes compete with other sites within its parent site collection.

2.       Branding – If you want to brand your content similar to other Sites/ Site collection, it is a good option to create a Site or sub-site. This way you can easily inherit the branding of your parent site without much effort

3.       Look up list – You can not create look up lists when the data is in different site collection.

4.       Back up  - You can easily back up data if you have stored it in different DB which can be done using different site collection

5.       Security inheritance – You can easily inherit the security permission in a site , but can not be done across site collections

6.       Navigation – Navigation is consistent if you create multiple sites under same site collection.

List of features deprecated in SharePoint 2013


A lot of discussion is carried out to highlight the remarkable features added to SharePoint 2013. However there are many features in SharePoint 2010 which are not present or deprecated in SharePoint 2013. Although Microsoft has tried to provide alternatives for these, if you are migrating from older versions of SharePoint to 2013, you should be aware of these. Here is a list of such feature / functionalities:
 
1.       Web Analytics is not available – SharePoint 2013 has got new analytics processing component and your SharePoint 2010 web analytics will not be migrated to 2013

2.       Visual Upgrade – This option is not present as a part of 2013 migration. But you have an option to defer your site collection upgrade

3.       Discontinued templates/solutions

a.       Document workspace – This functionality is now part of teamsite site template
                  b.      Personalization site – Discontinued due to less use of this template
                  c.       Meeting workspace – Other features provide similar functionality
                  d.      Group work site – Discontinued due to less use of this template
                  e.      Visio Process Repository – Discontinued due to less use of this template

 
4.       Sandbox solution – This functionality is not available in 2013. However if you migrate sites with Sandbox solution they will still work (may go away in next version)
 
5.       Organization profile - This functionality is not available in 2013. But any existing solutions using Organization Profile will work on 2013. Although this will be removed in next major release.
 
6.       Insert Barcode – This command is no longer available in the ribbon.
 
7.       PowerPoint Broadcast – SharePoint expects users to leverage Lync 2013 for similar feature
 
8.       Slide libraries – This has been removed due to design limitation of SharePoint
 
9.       Windows classic mode authentication – Microsoft recommends using Clams Based authentication and does not provide Classic mode by default. Although you can enable this mode using powershell script
 
10.   Refreshing connected workbooks using Windows authentication through Office Web Apps Server
 
11.   Mysite Features – Following mysite features have been removed

a.       Recent activities webpart
                  b.      Colleagues functionality
 
12.   Search of RSS feeds – RSS feeds are no longer available as part of search result
 
13.   Custom Help - Help content added via the Custom Site Collection Help feature or HCINSTAL.EXE will no longer display in SharePoint Online.
 
14.   Chart Webpart – This webpart is not avaialbe any longer. Any migrated webpart will work in 2013 however it will be removed in next major release
 
15.   Deprecated search features

a.       Modifying the search topology using web interface – You can still do it using Powershell
                  b.      Diacritic sensitivity element in the thesaurus
                  c.       Replacement mode within the thesaurus
                  d.      Search Query web service
                  e.      Search RSS and search from Windows
                  f.        Custom word breaker dictionaries
                  g.       Configuration of stemming in the registry
                  h.      SharePoint Search SQL syntax
                  i.         Shallow search refiners
 
16.   Upload multiple documents – this has been replaced with drag and drop features
 
I will keep adding to this. Please provide your valuable comments.

SharePoint reservation/Booking lists

Offices and Workplaces today require resource reservation/booking system to manage the resources efficiently. There are many products available in the market to fulfill this requirement.

However in decentralized organizations, such products might be too costly or overkill for such a simple requirement. If your organization is using SharePoint, there may be an easy way to set up such system.

SharePoing offers feature that can turn normal SharePoint Calendar to a reservation system with little effort. Here is how you can do it:

1. Activate "Group Work List" feature (If you can not find this feature in your site, contact administrator)





2. This will automatically create a list named Resource in your site. Now you can enter the names of the resources.



3. You can also group your resources as shown below. This grouping helps you view and manage the list better.



4. Now open a Calendar list or create a new Calendar list. To make this list a reservation/booking list, follow the steps below.



5. Your Reservation calendar is ready for use, Choose to create a new event.


6. You can also view your resources as below




 

Find Orphaned SharePoint Items using PowerShell script

The script below helps you find the orphaned items from SharePoint content databases

if ((Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null )
{Add-PSSnapin Microsoft.SharePoint.Powershell}


$CntDBs = Get-SPContentDatabase

ForEach ($CntDB in $CntDBs)
{   

      Write-Host "Detecting Orphans for " $CntDB.Name    $CntDB.Repair($false)
}


The above script will only list down the Orphaned items. You  can also repair these by changing

$CntDB.Repair($false) to $CntDB.Repair($true)

However before doing any such repair, you should be taking a back up of your DB.

Powershell scripts to Extract, import and deploy SharePoint farm solutions

When you are maintaining SharePoint Farm, you might often want to be able to extract all SharePoint solution in the farm, import it back and deploy it.

I have seen such requirements during the migration, creation or maintenance of various environments like Pre-Prod, production etc.
After searching it on Internet, here are the 3 powershell scripts I have found:

Extract all the farm solutions:

(Get-SPFarm).Solutions | ForEach-Object{$var = "C:\<LocationUWantToStoreWSP>\" + $_.Name; $_.SolutionFile.SaveAs($var)}

 
Import all the farm solutions:

Get-ChildItem | ForEach-Object{Add-SPSolution -LiteralPath $_.Fullname}

Deploy all solutions to farm:

Get-SPSolution | ForEach-Object {If ($_.ContainsWebApplicationResource -eq $False) {Install-SPSolution -Identity $_ -GACDeployment} else {Install-SPSolution -Identity $_ -AllWebApplications -GACDeployment}}



 





 

Email enable SharePoint list/Library

Users in SharePoint 2010 can enable the lists to recieve emails and update list items accordingly. This is a very good feature where you can easily pick up mails and track them in SharePoint.

For example, if you have a team that supports a system and you want to make sure that users can email your group, instead of setting a common DL or mailbox, you can now direct mails to your list. Your team can now look at the issue and update the list item. If some other team member wants to check the issue, he/she simply needs check the SharePoint list to get the current status.

Such lists are much better to monitor and report. Given below are the steps to enable your lists incoming email settings:


Once you have enabled incoming emails, test the setting by sending email to the mail ID(in this case TestUser@Intranet.com).

Please note that this is not a real email address, hence it might not be accessible from outside your network.

Copying SharePoint forms using Network location

I have recently come across this requirement where I had to copy some infopath forms from one SharePoint list to another.

Before going through the steps to copy the forms, it would be worth noting that, both the source and destination lists had same columns. If your source and destination does not have same columns, you might need to modify the infopath form at destination after copying.

Given below are steps to create a network location:



Once you have created the network location, you can use it as normal windows explorer window and copy forms as shown below.


Please be extra careful while using these Network locations as you might break the complete sharepoint site with it which will be difficult to recover from.

If possible, don't use the network location for copying content, as you can use the windows explorer view given in the Library ribbon

 

SharePoint Recycle Bins

What if you deleted a SharePoint list item/document or a site by mistake? SharePoint provides you recycle Bin to recover such items and save you a day. The idea is similar to the recycle bin on your windows, however SharePoint has taken it to a level up.

In most of the SharePoint sites , you can get to a recycle bin by clicking on the link provided in the left navigation bar. Alternatively you can click on Site Actions -> View all site Content and you will see the recycle bin option at the bottom. This Recycle Bin is Site recycle bin

On the recycle bin you should be able to see the documents being deleted. The documents stay in this recycle bin unless some one manulally deletes them or it is past the retention period. Your SharePoint administrator can set up the retention period as shown here

If the documents are manually deleted from the Site recycle bin, they go to next level of recycle bin called Site Collection Recycle Bin.  You can check this recycle bin using the link(marked in orange) as shown below, however you should have Site Collection administrator permission to do this.

On both these Recycle bins, you will find option to restore or delete the items. If you choose to restore the item, it will be restored to the same location where it was before being deleted originally.





If you want to restore deleted site collection visit this article: Restore deleted site collection

Managing alerts for other users

As a SharePoint site administrator or editor, you might want to create or delete alerts for other users. The steps given below can help you manage other user's alerts.

To delete the alert you can follow the steps below



For creating an alert for other user, you just need to follow the steps to create a new alert as given in the article SharePoint Alert Basics.

Once the alert window is open, in the Send Alert to section(Circled below), delete your name and add the other users name.





 

Open dialog/modal pop up on Image Click - Content editor webpart

I recently was trying to open a dialog/modal pop up window for a SharePoint page using an image link on Content editor webpart.

You can use the HTML below in your Content Eitor webpart and replace the links in with your page link.

<a onclick="NewItem2(event,”www.targetsiteforyou.com”); return false;" href="www.targetsiteforyou.com"><img width="45" height="40" alt="YourImage" src="www.yourimagelink.com " border="0"/></a>


This is very simple to implement and can give a very good navigation for your pages on SharePoint.

If you are using SharePoint Designer, you can also check the following post which uses HTML image button for similar functionality.Using image button with Modal pop up on SharePoint page

Error - One or more field types not installed properly - SharePoint Lookup Column

Recently, I was trying to move a list from one site collection to another. I created a list template in the source Site collection and uploaded the same in the destination.

Once the template was uploaded, I have created a list with it, however when the list was opened it threw the error: "One or more field types are not installed properly. Go to the list settings page to delete these fields.".

On analysis I found that this was caused because the newly created list (and the old one) contained a lookup column/field from another list. And the lookup list was not moved or present in my destination site collection. I tried deleting the look up columns from the new list, but got an error that I don't have access to the list. I further followed these steps to fix the problem:


  1. Created dummy list in my new site collection with the same name as required by lookup column/field. Since my source site collection was not available, I could not move the lookup list from there. If you have it available, please copy it to your destination. 
  2. Created a dummy lookup column/filed.
  3. Now the original lookup column which I could not delete was available for delete. I deleted it.
  4. Changed the name of the dummy lookup column/field created in step 2 to original look up column. If you don't require the lookup column/field, you can delete the dummy column also.
You can also avoid running into the issue, by just checking if you have a lookup column in the source list, and make sure that corresponding lookup lists are moved beforehand.

Document Sets


With SharePoint 2010, Microsoft has introduced the Document set which is a great new feature to manage documents. Document sets can be viewed as improved version of folder. It is a group of documents which can be considered as a single entity.
The most relatable example of usage of Document set is maintaining project documents. If you have a library to store documents related to project, you can create document set for project and store documents related to it. Few benefit of using document set is that:

  1. You can set property for the document set rather than individual documents
  2. You can configure documents to be automatically created for a document sets based on the template you provide. So if a project needs Estimation, Requirements, Design documents etc. you can configure the Document set to create them for you as soon as document set is created
  3. You can apply workflow etc. to all the documents in the document set together
  4. Document set can have its own customized welcome page
  5. You can version document set
  6. You will get additional settings in SharePoint designer with document sets
Technically, Document set is a content type and has to be enabled first at site collection level. You can follow the steps below to enable document sets if you have site collection administrator permission. If you don't, please contact your administrator to follow these steps.



Once the document set is activated, you need to activate the content type for your library and then add the content type for your library as shown below.



You can now start using Document set.  When you click on the document set under content type section on library, you can modify its property. Below is an example of how to create a Project content type exploring some of the features:

 
You can also modify the Document set content type to add more functionalities to it. http://office.microsoft.com/en-in/sharepoint-server-help/redir/HA101782461.aspx?CTT=5&origin=HA101782466

Using SharePoint Notes

Notes are useful social feature provided by SharePoint. You can add notes internal and external pages/sites which can be later referred on MySites. The way it works is very simple. For internal/SharePoint pages:

1. Look for the following icon or links on your pages



2. If you want to tag a page as "I like it" use this link
3. If you want to add any specific custom tag to the page click



4. This will open a dialog box. Navigate to the Note Board tab on the top. Now you can enter your notes for the page











5. These notes will be visible on your MySites



Tags and Notes go hand in hand. Hence you can do similar activities with your notes as you do with your Tags. You can find the details of such activities at Using SharePoint Tags

You can also communicate with other users using Notes. Just open there profile page and on the overview tab you will find a note board. When you update this, alert messages are sent to the other person.

Create custom ribbon button on SharePoint using designer

There are always some or the other action on your document library or list which you do repeatedly and many times a day. Clicking through various menu to do these becomes tiresome and you always wish if you had a button on your library robbon to reduce the effort.

Now you can add such a button on your ribbon with the help of SharePoint designer. Below is a step by step example where I created a notification button.

  1. Open you List or document library page and navigate to List/Library ribbon
  2. Look for "Customize Library" section on the right side of the ribbon and click on "New Quick Step"
  3. This will open SharePoint Designer with a pop up to set up property of the new button. You can choose to create a new workflow to implement the functionality of the button or can reuse already existing workflow.
  4. Note that you should know how to create workflow in SharePoint designer and should be able to translate your activity as workflow
  5. Once you have finalized the workflow click on "Publish".
  6. Open the library page again and choose one document. On the document ribbon under "Quick Steps" section, you should now be able to see the new button.


You can also associate the button to navigate to a form or webpage. For this you will have to:
  1. Navigate to the library on SharePoint Designer and look for the button in the "Custom actions" section in the botton right corner
  2. Click on the button name and choose the link where you want the button to redirect to.
  3. Save and publish the changes
  4. You can delete the button by choosing it and clicking on delete on the top ribbon



 

Page Viewer Webpart - Navigation to the webpage was cancelled

I was recently trying to show a webpage using a Page viewer webpart on a SharePoint site. Usually it is very straight forward. After you insert the Page viewer webpart, provide the URL of the webpage in the webpart property and it should work.

However this time, I was getting the error that "Navigation to the Webpage was cancelled".










It seems that this was happening because the SharePoint page URL was using HTTPS protocol but the link in Page viewer webpart was using HTTP protocol.

To fix this, I have just modified the URL in page viewer webpart to use HTTPS protocol as below. And it started working.



















It might be possible that your URL does not support HTTPS procol and thus your issue will persist.

Get log details using Merge-SPLogFile CMDlet

As you encounter any error/issue with your SharePoint estate, you want to know root cause of the error. You might have the correlation ID of the error or some other basic information like start time, end time etc.

You can open ULS Viewer but  it is very tedious to go through the logs and find out the cause of any issue.

With PowerShell, you can reduce the effort by using the Merge-SPLogFile CMDlet. The script given below merges the log files for specific correlation ID and start time.

Add-PSSnapin Microsoft.SharePoint.PowerShell
    
Merge-SPLogFile -Path "<path where you want to store merged log>" -Correlation "<Correlation ID>" -Overwrite -StartTime '02/01/2014 11:00:00'




There are many other parameters configurable for this CMDlet. Using Start time and end time parameters you can increase the performance.

More examples are provided at :
http://technet.microsoft.com/en-us/library/ff607721(v=office.14).aspx


 

Using SharePoint Tags

Social tagging of content is a very useful feature provided by SharePoint. You can tag internal and external pages/sites using this. The way it works is very simple. For internal/SharePoint pages:

1. Look for the following icon or links on your pages



2. If you want to tag a page as "I like it" use this link
3. If you want to add any specific custom tag to the page click
 

For external pages:
  1. Navigate to Tags and notes section on your My Site page
  2. Find the link at the bottom of Add SharePoint Tags and Notes Tool  area and add the tagging page on your favourite bar
  3. Next time whenever you see a page worth taggin, click on this Favourites link and add tag to the page


After you have tagged a page, it appears on Tags and notes section of your My Site -> My Profile.

By default it is visible to everyone(public). If you want to create a tag for private use only, you can choose the Private options as shown below





You can use Tags and notes section to delete or edit the tags

How tagging helps:
Often we come across pages, sites that we may need in future, tagging is will show the page on MySites -> My Profile -> Tags and notes section. This can work as a Favorite page for you. The good part is that you can share the page with your colleagues.

You also have a default tag cloud present on Tags and notes section. If you use your tagging properly, you can manage and group your pages in a better way. Plus, you can add multiple tags to the page/site.


At organizational or departmental level, administrators can define tags for you and help you organize the pages with tags.