Skip to main content

Posts

Showing posts with the label Sharepoint 2010

How to - Task list for project planning in SharePoint 2010

SharePoint 2010 has Task list template which can be used to track project work. The task list can be used to create task, assign task and track the task completion. When a project starts, it can be divided into various stages/tasks and each task can be assigned to a person with start and end dates. Each task may have sub-tasks also. A project is a collection of all the tasks, sub-tasks required to attain the output. The output can be a completed product, end-service etc. To create a project task list in SharePoint site, click on Site Actions, then click on View All Site Content and click Create. Click on List and select Project Tasks. Enter the Name for the project task list. Once the list is created, the user or manager can enter the task in the list. A task usually contains the Task Name, Start date, End date and Task Status. If the projects is done in various phases and there are inter-dependence between the phases, larger tasks for each phase, can be created. The larger tasks know...

How to show complete errors in sharepoint 2010

Enable Custom Errors: Set the customErrors mode to "Off" <system.web> <customErrors mode="On" /> Change To: <system.web> <customErrors mode="Off" /> Enable the Call Stack Trace: Set the CallStack value of the SafeMode element to "true" <SharePoint> <SafeMode ... CallStack="false" ... > </SharePoint> Change To: <SharePoint> <SafeMode ... CallStack="true" ... > </SharePoint> Enable Debugging Mode: Set batch and debug to "true" Find: <compilation batch="false" debug="false"> Change To: <compilation batch="true" debug="true"> Enable the ASP.NET tracing feature: Include the following line in the <system.web> element of the web.config file. <system.web> <trace enabled="true" pageOutput="true"/> ……. <system.w...

Open webpart maintenance directly in SharePoint

At times we would be faced with situation that the page does not load, due to some webpart issue. In SharePoint 2010, there might be a link in the error message to open the webpart maintenance page directly. In certain cases, it is not provided. So to open webpart maintenance page directly from url just append ?contents=1 at the end of the URL of respective page and SharePoint will open the Web Part Maintenance Page for it. For e.g, if the url is http://sharepointserver/sites/pages.aspx, make the url http://sharepointserver/sites/pages.aspx?contents=1 to open the webpart maintenance page. Note - the user need to have edit access on the page to open the webpart maintenance page.

Redirect to a desired page on click of submit/ cancel button in infopath form

By default, when a user clicks on Submit/Cancel button, the InfoPath list form redirects to the AllItems.aspx page of the list. Instead of redirecting the user to the default view of list, to redirect it to the desired page, append the URL of the InfoPath form with &Source=redirect-url http://xyzportal/..../xyzform.xsn&DefaultItemOpen=1 &Source=redirect-url Also, make sure that in the button properties, in the "Browser Forms" tab, "Always" option is selected.

Modify the height of multi-line column in Infopath 2010

In Infopath forms, we can set the height of a multi-line column to be fixed or dynamic. In case if the height is fixed(which is the deafult option), if there are more number of lines than that can be accomodated, a scroll would appear on the text box. This reduces the readability of the content for the user. To rectify the issue,the height can be set as auto(i.e., height would vary depending on the content) or a constant fixed value as per the requirement. Follow the below given steps to do the same. • Open the edit form in InfoPath designer. • Select the multiline column and then Right click on Text Box Properties. • In the properties window that opens, click on the Tab Size. • To set the height as auto, click on the align button available at the end • To make the height to be fixed, make the changes in the Size section for the height property . • Click OK to save the changes and then save and publish the form for the changes to be visible to the user.

Classes available in sandbox solutions in Sharepoint 2010

Microsoft.SharePoint Microsoft.SharePoint.Linq Microsoft.SharePoint.Search Microsoft.SharePoint.Security Microsoft.SharePoint.Portal Microsoft.SharePoint.Publishing Microsoft.SharePoint.Search.Extended.Administration Microsoft.SharePoint.Search.Extended.Administration.Common Microsoft.Office.Excel.Server.Udf Microsoft.Office.Server Microsoft.Office.Server.Search Microsoft.Office.Server.UserProfiles Microsoft.SharePoint dll Namespaces available in Sandbox Microsoft.SharePoint Microsoft.SharePoint.Administration Microsoft.SharePoint.Navigation Microsoft.SharePoint.UserCode Microsoft.SharePoint.Utilities Microsoft.SharePoint.WebControls Microsoft.SharePoint.WebPartPages Microsoft.SharePoint.Workflow To know the classes that can be used refer - MSDN

Error: Performance Point Service Appication not configured correctly

When trying to add excel service as Datasource in BI center site, it gives an error “This data source cannot be used because PerformancePoint services is not configured correctly”. To solve the issue, do the steps listed 1. Go to Central admin--> Manage Services --> Secure Store services 2. First time when the secure store services page opens, it says that no keys generated. Click "Generate new key" in toolbar and then step through "targetting" and "set" the key sections 3.Go to "Managed Services" in Central Administration and select the respective PerformancePoint Service 4.Open "PerformancePoint Service Application Settings" and add Unattended Service Account which was configured in step 2 Secure Store Service: - This service application stores the password for the PerformancePoint Services unattended account.

Event handler to copy items from one site to another

The code can be used to copy items from one site to another ,but source and destination sites must be in same server. If the item was added newly in a Document Library , Item Checked In Event Handler must be used :    public override void ItemCheckedIn(SPItemEventProperties properties)        {            base.ItemCheckedIn(properties);            try            {                SPSite sourceSite = new SPSite("Source Site URL");                SPWeb sourceweb = sourceSite.OpenWeb();                SPList sourcelist = sourceweb.Lists["Source List"];    ...

Upload large files (>1GB) in SP2010

The default limit of a single upload file in SharePoint is 50MB. The size limit can be increased upto 2GB, from central admin. To increase the size limit and any issues faced during upload of large files, check the link below http://blogs.technet.com/b/sharepointcomic/archive/2010/02/14/uploading-large-files-to-sharepoint-on-windows-server-2008-and-iis7.aspx As given in the link, it is not recommended to upload large files of size greater than 500MB thru sharepoint. The reason's why large file uploads are not recommended via browser is listed Reliably transferring gigabyte or bigger files without breakages over a protocol like HTTP, which is better suited for tiny transfers like images and text. Not killing your browser because it has to load all that in memory Not killing your web server because All that you upload through HTTP post, first gets streamed into IIS Memory, w3wp.exe memory before the ENTIRE FILE finishes uploading .. before it is stored. Which means, ...

Federated Search usage reports

Federated search is a feature in Shareoint 2010, where results from external sites, other sharepoint farms, Local sites in same farm can be queried and results be displayed. On how to configure federated search, refer http://blogs.msdn.com/b/sharepoint__cloud/archive/2012/03/12/configure-federated-search-to-get-results-from-remote-another-sharepoint-2010-farm.aspx Consider a federated search webpart in farm B, where the search results are from Farm A. To know the usage of the federated search, will have to check the reports in source farm (Farm A). Go to central admin - Application Management - Manage Service Application - Click on the search service application On the left pane, Under Reports, click on Web Analytics report The usage report would show the total usage report of the search service application Say the search service application is used by a site collection and also by the federated search So, say it shows 1000 No of queries for the past 30 days. Site coll...

Display a Thank You message at the end of survey form in Sharepoint 2010

A quick and easy way to display a Thank you message at the end of survey for submitting the form. At the end of last question, insert a page breaker. After the page breaker, add the Thank you message as a question, and select the type Single line of text. Enter the default value as "Internal". Go to the survey form and click on Respond to Survey. Click Next and in the Editform url in the browser, append &ToolPaneView=2 to the end of URL. Add a CEWP to the below of the page and insert the below code, in HTML source or else paste the code in a text file uploaded to sharepoint library and refer to the text file. (referring the text file is preferred) <script> // hide the input textbox for the "thank you " message  var x = document.getElementsByTagName("INPUT");  var i=0;  for (i=0; i<x.length; i++)  {   if (x[i].value=="Internal")   {     x[i].style.display="none";   }  }  </script> Save the page. Respo...

Create Export to Excel option for list as button control in page

In Sharepoint 2010, in the list ribbon there is an option Export to Excel, to get the list data in excel format. The same option can be given to the end user on click of a button in the page Create a content editor webpart. In the html source enter the following code <button type="button"  <a href="#" onclick="javascript:window.location='../_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List= ListGuid &View= ViewGuid &CacheControl=1'"><img src="/_layouts/images/icxlsx.gif" border="0"/>&nbsp;&nbsp; Export to Excel</a> </button>

Calculated column tips

Calculated columns is one of the types available in SharePoint. Some important rules and guidelines are as follows: The functions TODAY and ME are not supported in calculated columns but are supported in the default value setting of a column. Arithmetic operators supported include + (addition), - (subtraction), * (multiplication),/ (division), % (percent), and ^ (exponentiation). In Equations parenthesis are allowed. The allowed Comparison operators are  = (equal to), > (greater than), < (less than),>= (greater than or equal to), <= (less than or equal to), and <> (not equal to). & (ampersand) is used to connect 2 values and produce one continuous text value. A value other than the current row cannot be referenced A value in another list or library cannot be referenced. The RAND and NOW functions is not supported in Lists and libraries. Most of the Excel functions are supported in SharePoint calculated columns, but not all.

Form cannot be rendered error when opening Infopath list forms

While trying to open the InfoPath form created for lists in SharePoint 2010, an error was encountered as given - " The form cannot be rendered. This may be due to a misconfiguration of the Microsoft Sharepoint ServerState service. For more information contact your server administrator" This error can occur if the state service is not activated while creating the web application. To resolve the error, follow the below steps. • Open central admin -- Application management --Manage web applications. In the page that opens select the web application and click on Service connections in the SPRibbon. • The above step will open the Configure Service Application Associations dialog box. Select the State Service and click OK. • Then the configuration wizard must be run to activate the services

Sharepoint 2010 correlation error - Request for security token failed with exception

After windows update, Sharepoint 2010 sites do not come up and shows correlation error. Or, the site comes up but the global navigation and left navigation shows error. On the ULS log when checked it shows - “Request for security token failed with exception: System.ServiceModel.ServiceActivationException: The requested service, 'http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc/actas' could not be activated. See the server's diagnostic trace logs for more information.    Server stack trace:      at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory factory, WebException responseException, ChannelBinding channelBinding)     at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)     at System.ServiceModel.Channels.RequestCha...

Infopath 2010 Tips - Custom close button and hide the ribbon

How to hide the ribbon in Infopath 2010 Go to list – Customize List tab- Click on Modify Form Webparts – Click on the content type form – Edit Form A new page with the Infopath form webpart would come up   Click on Edit webpart Uncheck Infopath Ribbon or toolbar. Click Apply & OK. Click on Stop Editing of Page. Now when the Edit form is displayed on browser, it would not have the ribbon. How to add custom close button Open the form in Infopath 2010 Add a button - Select the button and click Manage Rules In the rules pane – click on New – Action – Add – Close the form No conditions to be added. Rename the button to Close/Cancel Publish the form

Multiple ways to hide My Settings/Sign out/Personalize/My Profile in Welcome Username control in SharePoint 2010

Jquery   to hide My Settings, Personalize this page, Sign in as different user jQuery(document).ready(function($){   $("[text='Sign in as Different User']").remove();   $("[text='My Settings']").remove();   $("[text='Personalize this Page']").remove(); }); Hide My Site and My Profile using CSS To hide the menu options, add the below CSS in master page .ms-MenuUIUL LI[text='My Site'] {  DISPLAY: none } .ms-MenuUIUL LI[text='My Profile'] {  DISPLAY: none } .ms-MenuUIUL LI[text='My Settings'] {   DISPLAY: none }

Max limit and performance of SharePoint 2010 Workflow

The max number of workflow running is by default set to 15. This is applicable for both SPD and visual studio workflows. The number does not include the workflow instances which is 'In progress' state. The number represents the number of active workflows using the processor and it is set for the entire farm and does not depend on the number of front end servers. The number can be configured using powershell command Set-SPFarmConfig More can be read from http://technet.microsoft.com/en-us/library/ff607962(v=office.14).aspx The existing farm settings can be obtained using the command Get-SPFarmConfig Reference < http://technet.microsoft.com/en-us/library/ff607745(v=office.14).aspx > To know more about SharePoint workflow performance and scalability parameters read the msdn article - http://msdn.microsoft.com/en-us/library/dd441390(office.12).aspx More about SharePoint 2010 workflow http://msdn.microsoft.com/en-us/library/hh237664(v=office.14)...

Parallel tasks in serial workflow - Sharepoint 2010

It might be required that in a serial workflow with mutliple stages, there might be more than one users. The workflow should proceed to next step, if one of them completes the step. For e.g., consider there are 2 groups of reviwers, say Group A and Group B. When an item is created, an email would be send to Group A users. If one of the members in Group A completes the task, it should send mail to Group B users. In such scenarios, create 2 sharepoint groups, one for Group A and one for Group B. Add all the members to the respective groups. Create the workflow in SPD and after first action, assign the task to Sharepoint Group A. Now if anyone of the users in Group A completes the task, the task status changes to completed and the next step would be continued. It does not require that all members in Group A complete the task assigned.

Cannot open SharePoint 2010 Approval task form from Outlook

When trying to click on Open this task from Outlook 2010, it brings an error - " Outlook cannot open a new form. The form contains schema validation errors" Element '{ http://www.w3.org/1999/xhtml}div ' is unexpected according to the content model of parent element '{ http://schemas.microsoft.com/office/infopath/2009/WSSList/dataFields}Body '. As given in the error message, the issue is with the Body column of the workflow tasks list. For the approval workflow, there would be a tasks list. In the workflow task list, the Body column is Enhance Rich multi-line column. Change the setting to Plain text, instead of enhanced rich text. After that do an iisreset.