Thursday, November 28, 2013

Distribution lists in SharePoint

In SharePoint, we can manage the users by assigning the permission levels to groups. We can do that by setting up individual users of Active directory groups. We can do that in two ways using Security groups in site and using distribution groups.

A distribution group is used to send emails for not security-enabled users. We cannot list the distribution groups in discretionary access control list that are used to define the permissions. By selecting security groups users will not be accessible to my sites. User groups will be dedicated to only a specific site.

We can create SharePoint distribution groups by navigating security and clicking on the Approve or reject distribution groups in Users section.

Create new Item in the distribution group by clicking on new item link

Enter details of the item like group title, Alias name, Description, Owner Email details. Click on ok to save details. Here justification is message to the user who approves the requests in the distribution groups. We can see the requests in the list once it is approved.

Wednesday, November 27, 2013

Gantt view errors in SharePoint site- “Microsoft.SharePoint.SPException: This view requires at least Microsoft Internet Explorer 7.0, Mozilla FireFox 3.0, or Apple Safari 3.0.”

In SharePoint 2010, sometime we try to browse the gantt index pages, we can see the error as “Microsoft.SharePoint.SPException: This view requires at least Microsoft Internet Explorer 7.0, Mozilla Firefox 3.0, or Apple Safari 3.0.” as shown the image below.

We can get this error when user agents in SharePoint are not permitted to crawl the content in SharePoint index server. We can fix this by changing Gathering manager value in Registry. To do that Start -> Run -> Regedit

Navigate to following path,
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\14.0\Search\Global\Gathering Manager

In Gathering Manager, Search for “User Agent” and edit the value. Update the value to
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; MS-RTC LM 8; Tablet PC 2.0)

Click on Ok Save the settings and restart the server.

Tuesday, November 26, 2013

Document information panel in SharePoint

Document information panel in SharePoint contains Meta data about document. This will enables users to enter metadata regarding the document. Documents stored in library will contain other columns to show metadata. Document information panel will display the field for each content type property or column that user can edit.
Document management panel allows users to enter metadata for Microsoft based documents that stored in SharePoint. This will not display by default with the document. We have show this by changing the settings for content type.

We can enable document information panel using the steps below,
Navigate to SharePoint Document library Settings page, Click on the content type which to enable Document Information Panel should be enabled.

Click on Document Information Panel Settings in settings section.

In Document Information Panel Templates section, we can specify the default template or custom template. Select “Always Show Document Information Panel on document open and initial save for this content type” Check-box in Show Always section, Click on OK to save the settings.

By editing the document uploaded to document library we can see the fields as shown below.

Monday, November 25, 2013

SharePoint user profile service error: An error was encountered while retrieving the service

While working with SharePoint user profile through code, I got an error when accessing the user profile from user profile manager. Stack trace has thrown the error as,  

Microsoft.Office.Server.UserProfiles.UserNotFoundException was unhandled
  Message=An error was encountered while retrieving the user profile.

I have checked in User profile service that account crawled correctly or not. Yes it is there. Iam able to get the user in SharePoint user picker as expected. I have googled about the issue for some time. I have fixed the exception using an article from technet. Tip shown in the blog post fixed my error.

Actually iam getting the error from following code line 

UserProfile currentUser = profileManager.GetUserProfile("Domain\UserName")

Here profilemanager is UserProfileManager object. After changing “\” to “\\” in user profile my issue got fixed. I have replaced my code line with 

UserProfile currentUser = profileManager.GetUserProfile("Domain\\UserName")

Simple. Hope this will help you.

Wednesday, November 20, 2013

Difference between Cumulative updates, Service Packs and Public Updates

While applying the updates in SharePoint I have a lot of confusion every time in Cumulative Updates, Service Packs and Public updates. By going through articles in TechNet and some of blog posts, i have found the following differentiation among them.

Service Pack:
It’s an update or combination of previous updates helps to make our product more reliable. It includes new fixes, functionality additions and all fixed that released previously (means Previous Service packs, Cumulative updates). That means if MS people released a service pack recently means that contains all the list of features up to date.

Service packs will not be multilingual. We have to download and install separate service packs for each installed language. We must install service packs for specific product as soon as possible. Microsoft provides all the latest fixes and updates in Service pack. There are no prerequisites for Service pack installations because each service pack includes all the recent updates from product release. Service Packs will not release frequently.

Cumulative Update (CU):
Cumulative update is collection of all the hot-fixes up to date. Generally Office hot fixes are released for every two months in a package. It includes fixes for all the issues collected from hot-fix accepted criteria that related to customer impact or reproducible. 

Cumulative update also includes critical on-demand hot fixes and security updates. It includes all the previous cumulative updates and public updates from previous service pack release. Cumulative updates are multilingual. It includes fixes for all languages. To install CU in our machine,, we have to install recent service pack related to that product (If released). 

Generally cumulative updates are not mandatory to install. We can install them to fix any issue. While downloading CU itself we can see the applicable scenarios in KB article page. There is lot of chances to affect the system. So we have to check before installation or advised by Microsoft people support to install. Cumulative updates releases frequently for a second month like (Feb, April, June, Aug, Oct, Dec)

Public Update and Critical On Demand:
Public update includes product fixes that applicable to large number of customers. Public update also applies for multilingual. To install public update we have to install most recent service pack if released. Sometimes Public Updates may have prerequisites for Cumulative updates also.  Public Update includes security fixes and it is recommended to install ASAP.

Critical On Demand will applicable for less number of customers facing critical problem. It will applicable for a specific problem or issue. COD is not multilingual. We have install COD’s on Microsoft people recommendations only.

Thursday, November 14, 2013

Retrieve user manager and send email in SharePoint designer workflow

Recently I had a simple requirement like leave approval task. Whenever user submits a leave request, an email needs to be send user manager. It is an easy task by providing the manager name in leave request form. But we don’t have manager field here. So according the requirement we have to get the manager assigned to specific user from AD.

We are not allowed to deploy the custom code for the requirement. I thought there is no option to get the user manager assigned in AD from designer WF. I have tried if there is any option to get user manager. Surprisingly I have found the Option in designer workflow to get Manager Details and also it is available from 2007 version. Superb.

We can get the user manager details by using simple command as shown below,
Search for command look up we can get “Find Manger” option as shown below.

Select the User and manager and assign the user to manager variable. Send email to the manager using Send mail command.

Simple. There are plenty of options are available in SharePoint designer instead of going custom development. Hope this helps. 

Tuesday, November 12, 2013

Shape images using Image renditions technique in SharePoint 2013

Generally SharePoint content writers can get images from other departments like marketing or business development users in some high resolution formats. Content writers can upload that image to the SharePoint after re-sizing the image to their need. In SharePoint 2013 we are having the option to re size the image in site itself. We can re-size the image by using image rendition techniques in SharePoint. By using this we can add images to library and we can re size them in various sizes before adding them to pages.
To use image renditions we have to enable publishing feature and BLOB cache. We can turn on the BLOB cache in Web.config file. To enable blob cache, navigate IISManager and select site, explore to content view. Edit web.config file using any text editor. Search for “<BlobCache” tag, in the line we’ll see enabled=”false”. Change that to “true”, save the file.

By enabling the Publishing feature in Site collection we can “Image Renditions” link in “Look and Feel” section of Site Settings page.

By clicking on the Image Renditions link we’ll navigated to Image Renditions page. We can see default Display Templates with height and width. To create new layout, Click on “Add New Item” link and need to provide height and width.

To crop images, Navigate to picture library, select the image to crop and select “Edit Renditions” in top ribbon “Design” section.

We can see the image in the available Display Templates formats as shown below.

To use renditions, Add image to SharePoint publishing page and Select “IMAGE” on the top ribbon, click on “Pick Renditions” button on top ribbon. We can select the template as our requirement.

Monday, November 11, 2013

Work management service application in SharePoint 2013

We have a new service application in SharePoint 2013 to track the user tasks distributed across the sites/site collections/web applications. This will provide to aggregation of the tasks to a central location in SharePoint server. By using this service users can view their to-do tasks in personal site level. All the tasks will be sync into outlook. We can also see the tasks from Exchange, project server. Based on the provider model, users can sync with other systems. We can see all the tasks in my site tasks.

To view the tasks we have to check with following things,
  • We have to check each of the search service should have valid content source and it should be in Continuous crawling. If we have incremental crawls, crawl should happen in very often time intervals.
  • Application pool using for my site should have SPDataAccess SQL permissions in the content database of the web application.

Work Management Service will work on Search. If crawl was not proper, we cannot see any tasks to display. All the tasks used to store in “WmaAggregatorList_User” list in personal site of individual users.  All the tasks can be viewed tasks page of my site.  We can see the tasks in different sections as, important and Upcoming Tasks, Active Tasks, Completed Tasks.

To Create Work Management Service Application, Navigate to Application Management in SharePoint central administration, select Manage Service Application link.In Service applications page, create new Work Management Service Application, and specify the details as shown in the images below. 

This service will have dependency on User Profile Service and Search Service.
We can see the error with yellow warning triangle as “We are having trouble refreshing your tasks” error on “My Tasks” page as shown below.

We can see this error for multiple reasons,
  • Work Management service application was not created.
  • Work management service application dependent services may not running (Search service or search crawls)
  • Account using for Work Management Service Application is same as Web application or Service Account running for Work Management Service Account is not having full Permissions for User Profile service application.

We can see more details on Work Management service application in the following links

Thursday, November 7, 2013

Image sliding in SharePoint using Picture Library Slideshow WebPart

We can get image sliding functionality using SharePoint inbuilt WebPart “Picture Library Slideshow WebPart” Using this in-built WebPart we can slide the images from SharePoint picture Library. We can create and display the slideshow in selected page.

We can add image slider to a page by using the following steps,

Edit SharePoint Page, Click on Insert tab from Ribbon, Select WebPart button to insert the webparts. From categories list, Select “Media and Content” group, Select “Picture Library Slideshow Web Part” and click on Add button to insert the web part.

Edit the web part to specify the images source to display images.

We have to specify the slide duration, Picture Library, Order in webparts edit pane. Click on OK.

We can see sliding images once we updated with the webparts properties.  This helps us to image sliding instead of creating custom images.

Wednesday, November 6, 2013

SharePoint 2010 Access error - "This report failed to load because session state is not turned on. Contact your SharePoint farm administrator"

While working with SharePoint access services, Browsing contacts after publishing the Contacts form in SharePoint site I got an error saying that,
“This report failed to load because session state is not turned on. Contact your SharePoint farm administrator” as shown the image below.

We can fix this error by enabling the session state for SharePoint access reports. To do that we have to run the following Power Shell commands in SharePoint Management Shell with Administrator privileges,


We can see the response to provide the Database name. Enter Database base as AccessServiceReports (We can enter any name). A database will be created with the name in SQLServer. Reset IIS (IISRESET)

We can enable session state for web application if we still have the problem. We can do that by using the steps below,

Open IIS Manager and Select the web application by expanding sites list. In IIS Section, double click on “Modules”.

In Top Right side of the modules window, click on “Add Managed Module” link.

We can see “Add Managed Module” popup window. Enter any unique name in “Name” text box and specify the Type as “System.Web.SessionState.SessionStateModule, System.Web, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a” from “Type” dropdown as shown the image below. Click on Ok to save the settings. Reset IIS.

Monday, November 4, 2013

Always open visual studio with admin privilege

This is a basic post other than SharePoint. Generally we will get issues if we open Visual Studio other than administrator permissions. To overcome those security issues it will be preferred to open VS in admin credentials. We can do that by Right clicking on visual studio short cut and selecting “Run as Administrator” option. We can open Visual studio in admin mode directly instead of selecting “Run as Administrator” option every time. To do that we have to follow the steps below,

Right click on “Visual Studio” and select “Troubleshoot compatibility” option.

In “Program Compatibility Troubleshooter” wizard, select “Troubleshoot program” Option.

In “What problems do you notice” screen, check “The program requires additional permissions” checkbox, click on “Next”.

In “Test compatibility settings for the program” screen click on “Test the program” button and click on Next.

We can see “Troubleshooting has completed. Is the problem fixed?” screen. Click on “Yes Save thee settings for this program” to save the settings.

Hide Ribbon from Anonymous users in SharePoint 2013

In my current project, I had a requirement to hide the ribbon from anonymous users dude to security reasons. In SharePoint 2010 we can do that by modifying the master page. But in 2013, we can’t modify the master page directly. We need to modify the .html file associated with the master page.

We have .html file for every master page with same name, for Seattle.master we have seattle.html and oslo.master we have oslo.html pages which specify the controls and tags of the master page.

We can see the tags in HTML pages start with <!--MS:--> and <!--ME:--> that shows the markup inside of the tags for the corresponding masterpage. We need to do changes in the html page to hide the ribbon from anonymous users.

Open html page in SharePoint designer 2013, (Master Pages-> Select appropriate html file, Edit the file)

Search for “<div class =”ms-belltown-anonshow”>” tag and add following code on the top of the div,
<!—MS:<SharePoint:SpSecurityTrimmedControl runat=”server” permission=”AddandCustomizepages”>—>

Add following code after closing div tag.

Save HTML file. After adding these tags, design manager will update the respective masterpage for hiding the ribbon from Anonymous users. Instead of “AddandCustomizepages” permissions, we can give list of enumeration permissions referred in the link