Archive

Archive for the ‘SharePoint’ Category

5 ways SharePoint can save your business money

April 6th, 2010 Sandeep Walia No comments

The current economic climate has created a unique set of challenges for organizations in all industry sectors. Business decision makers are under pressure to constrain spending, and that includes IT investment and expenditure. At the same time, businesses must continually seek to maintain and improve their productivity and effectiveness in order to stay competitive in what may be a shrinking market for their goods or services.

This paper focuses on five specific ways in which SharePoint Products and Technologies can save you money. When you adopt SharePoint Products and Technologies in your organization, you can:

  1. Reduce IT costs and complexity, by consolidating multiple product investments into a single infrastructure, by reducing infrastructure and support costs, and by getting all your enterprise solutions under a single product license.
  2. Reduce development costs, by using comprehensive out-of-the-box components, by using built-in integration with the Microsoft Office 2007 suite, and by using the .NET Framework object models to reduce learning curves and development time.
  3. Simplify management and training, by providing a single, easy-to-use interface for end users and for IT administration and governance.
  4. Improve employee productivity, by implementing collaboration workspaces, self-service Web publishing, social computing features, and business process workflow and forms.
  5. Enhance the effectiveness of customer service and sales teams, by aggregating critical information from across the enterprise and by providing rapid, easy access to information.

Like many organizations, yours probably relies on enterprise solutions in a number of key areas to facilitate productivity and effectiveness. For example, you might wish to implement:

  • Enterprise Content Management solutions. These include tools to aid collaboration, such as shared workspaces with document version management and workflow, and business process integration solutions to capture and manage the flow of information around your organization.
  • Portal solutions. These provide a unified entry point and a common infrastructure for sites, workspaces, and Web content across your organization. Portal solutions may be targeted at your employees, your partners, or your customers.
  • Search solutions. These provide a platform from which employees can search for relevant, up-to-date information from disparate sources across your organization. Effective search solutions are becoming an increasingly essential tool for large or information-driven organizations – an independent survey by IDC found that the average information worker in the United States spends approximately nine-and-a-half hours per week searching for information (IDC: The Hidden Costs of Information Work, April 2006, Doc #201334).
  • Business intelligence solutions. These provide a way of aggregating and summarizing critical information from line-of-business tools, such as inventory management or customer relationship management systems. Business intelligence solutions are used to create clear and often highly visual dashboards for use by customer service representatives, sales executives, and senior management.

These solutions provide an essential service in the day-to-day operations of an enterprise organization. However, they also bring additional overheads and can introduce new demands on your IT resources. Enterprise solutions are generally expensive. In addition to licensing the software, you must invest time and money in implementing the necessary infrastructure. Every new solution you introduce creates additional demands on your IT team, who first must learn how to deploy and manage it and later must devote time to administering and maintaining it. Your end users will require training and mentoring on every new system.

It can also be difficult and costly to integrate enterprise solutions with one another, which is often necessary when you want to provide truly effective business information in your organization. Extending or tailoring these solutions to your specific requirements may demand highly specialized expertise that, needless to say, comes at a premium price. You may also want to consider the benefits and issues of your enterprise solutions from the perspective of your end users:

  • How many different systems do your employees have to use to do their jobs?
  • How much time does it take an employee to learn to use each system effectively?
  • How easily can an employee find information, share information, or aggregate information from different sources?

It may be many months following the deployment of an enterprise solution before your employees are comfortable using it and fully understand the feature set that it provides.

How SharePoint Can Help

Let's take a look at how SharePoint Products and Technologies can address some of the pain points of enterprise solutions.

Windows SharePoint Services 3.0 (WSS) is the core platform that underpins every product in the SharePoint Products and Technologies suite. WSS provides you with the capability to quickly create Web sites with key collaboration and document management features. Built on ASP.NET and the .NET Framework, WSS exposes a comprehensive, easy-to-use object model that enables developers with experience of ASP.NET and managed code to extend and customize the feature set with ease.

Microsoft Office SharePoint Server 2007 builds on WSS to provide a comprehensive, enterprise ready information management solution. At the same time, because it builds on WSS, it retains all of the extensibility and programmability of the underlying platform. Key features of Office SharePoint Server 2007 include:

  • A rich feature set for collaboration, including workspaces, document management, wikis, and social computing features.
  • A complete portal framework that you can use to aggregate, manage, and control access to information across your organization.
  • True enterprise-class search across SharePoint sites, remote Web sites, document stores, and line-of-business applications.
  • A full enterprise content management suite, with tools to aid Web publishing, audience targeting, and records management for all types of online content.
  • Comprehensive support for business process integration and workflow.
  • A rich business intelligence framework that you can use to aggregate line-of-business data and create business intelligence dashboards.

In a nutshell, Office SharePoint Server 2007 integrates several enterprise solutions into a single, manageable system. This integration and extensibility can help you to reduce the total cost of ownership for your IT infrastructure, by:

  • Reducing infrastructure costs and complexity.
  • Reducing development costs.
  • Simplifying management.
  • Minimizing training requirements.

At the same time, the rich feature set and ease of use helps you to maximize your return on investment by:

  • Improving employee productivity.
  • Enhancing the effectiveness of your business teams.

To get more details on how Microsoft SharePoint can save you money, download the full paper today.

Sandeep Walia is the President & CEO of Ignify. Ignify has over 300 person years of SharePoint experience and internally leverages SharePoint as a tool to collaborate across all its offices and for all its projects. For help on Sharepoint Services email us at sharepoint@ignify.com

MOSS 2007 – Show/Hide ‘Workspace’ on New/Edit Form

December 4th, 2009 Atul Shukla No comments

Somebody asked me about hiding a field called 'Workspace' from Calendar: New Event or Edit existing event.
I was wondering that there should be some easy way to hide any field available on 'New' or 'Edit' page.

I googled around, and I found couple of responses, for example:

  1. Modifying the NewForm.aspx page in SharePoint Designer 2007, hiding existing List Form Web Part, and then adding Custom List Form. Then delete the Workspace row from the form.

    Let me talk about the disadvantages of this option:

    • a. Attach File will NOT work. You need to investigate further to make it work. Still painful process.
    • b. Try to create a 'Recurring' event; it will not work as expected.

    Considering these advantages, I thought that this is very tedious process, and one has to make the changes to all calendar lists. And then this change is required to be done on NewForm.aspx and EditForm.aspx. How about that? So it is really very painful process.

  2. Another option is again, modifying the NewForm.aspx or EditForm.aspx, and add following script (However, it didn’t work for me though), but it is worth adding it here, just in case, if people are trying to solve the problem in this manner.

    <script language='JavaScript' type='text/javascript'>
        var toolbar = document.getElementByName("<name attribute value>");
        toolbar.parentNode.parentNode.parentNode.style.display = 'none';
        toolbar.parentNode.parentNode.style.display = 'none';
    <script>

    This can be added in asp:content ContentPlaceHolderId="PlaceHolderTitleAreaClass".
    Once again as I said that it didn’t work for me, but it can be done this way too.

  3. Recommended way. First thing is that it is a feature, and can be found (12 Hive folder) at C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\Template\Features\EventsList. Yes, it is event list feature. Now the modifications are required in schema.xml that can be found under Events folder (folder location, once again, is ..\12\TEMPLATE\FEATURES\EventsList\Events). This file can be modified in notepad.exe.

    While looking into the Calendar List Settings in Internet Explorer, I noticed that this field 'Workspace' is of type 'Cross Project Link'. This is important to remember, and search 'CrossProjectLink' in schema.xml file. I noticed there is only one instance of it.

    Secondly, the field is SharePoint field so looked for the corresponding class which is SPField. I looked into SPField Class Members on MSDN and found a couple of interesting properties (and used two of them), for example, ShowInDisplayForm, ShowInEditForm, ShowInListSettings, ShowInNewForm, ShowInVersionHistory, ShowInViewForms. I was interested in ShowInEditForm and ShowInNewForm properties only. So in schema.xml file, for Field of Type="CrossProjectLink", added these two properties as attributes, and set the value="FALSE".

    IMPORTANT: attribute value should be set as ShowInNewForm="FALSE" (case sensitive). If you set the value as ShowInNewForm="false", it will not work, so be careful here.

    My final <Field> is looked like:

    <Field ID="{08fc65f9-48eb-4e99-bd61-5946c439e691}" Type="CrossProjectLink" 
        Name="WorkspaceLink" Format="EventList" 
        DisplayName="$Resources:core,Workspace;" DisplayImage="mtgicon.gif" 
        HeaderImage="mtgicnhd.gif" ClassInfo="Icon" 
        Title="$Resources:core,Meeting_Workspace;" Filterable="TRUE" 
        Sealed="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" 
        StaticName="WorkspaceLink" ShowInEditForm="FALSE"
        ShowInNewForm="FALSE">

    As mentioned, I added only two attributes. Save the schema.xml file.

Now the task is to publish the feature with changes. And since the feature is already installed and activated, so it is mandatory to de-activate it and then un-install it.

To smoothen the process I wrote two batch files one each for de-activate, un-install and install, activate:

script for uninstallfeature.bat

path="C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN"
cd \
cd "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN"
stsadm.exe -o deactivatefeature -filename EventsList\Feature.xml -url http://moss2007:8551/sites/Demo1
stsadm.exe -o uninstallfeature -filename EventsList\Feature.xml -force
cd \

It is straight forward to understand, however, if you want instructions for the same, can send me request.

script for installfeature.bat

path="C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN"
cd \
cd "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN"
stsadm.exe -o installfeature -filename EventsList\Feature.xml
stsadm.exe -o activatefeature -filename EventsList\Feature.xml -url http://moss2007:8551/sites/demo1
cd \

URL is required to install the feature, in this script, I am deploying the feature for a specific website.
Don’t forget to do ISRESET

I am done, and when I tried to create or edit a calendar event, I don't see 'Workspace' option in there. I double checked that attach file is working, and I am able to create a 'Recurring' event too.
It is really very useful tip for me, so thought let me add it here for future reference too.

This post is written by Atul Shukla. Atul is a Manager in the Microsoft SharePoint Practice at Ignify. Ignify has over 300 person years of SharePoint experience with multiple SharePoint implementations. Ignify also internally leverages Microsoft SharePoint as a tool to collaborate across all its offices and for all its projects. For help on SharePoint Services email us at sharepoint@ignify.com

Multi-level Workflows in Microsoft SharePoint

December 1st, 2009 Sandeep Komalan 1 comment

Workflows are a powerful and yet surprisingly easy to use feature in SharePoint. You can use workflows to manage a business process or any series of tasks required to get a job done. You might use a workflow, for example, to manage expense reporting, manage time sheet or leave applications.

Out of the box SharePoint approval workflow allows you to configure the workflow on a list or on any library. It is pretty straight forward to configure with static approvers and can specify when to start and end the workflow.

But, if you want your workflow to choose an approver based on some criteria then things can get a little complex. I have provided an business example of  of how you can make this happen along with relevant code.  Ignify recently implemented a multi-level routing workflow for a  non-profit organization serving 24 million members. I have built on our experience from that project and other Microsoft SharePoint Server implementations 

Scenario: You have a leave request application in your SharePoint and the company policy is leave request should go to the submitting employee’s supervisor for approval.

In the above scenario, the supervisor can be different for each employee. How will you pass this dynamic supervisor information to your approval workflow?

Solution:

  • Determine the GUId or Index value of your approval workflow.
  • Determine the Association data that the workflow requires to start.
  • Modify the Association data to provide appropriate approvers.

Steps :

  1. Configure the approval workflow to the list or a library with some specific values.
  2. Don’t specify the option of starting the workflow when an item is created or modified.
  3. After configuring the other necessary parameters, your list or library is set with an approval workflow.

Now your list or library will have the workflow configured and the workflow will have the association data which we can modify and start the workflow.

Accessing the workflow from code.

One of the biggest developer-focused enhancements in SharePoint is, for handling server-side events. For example, when a user performs an action that modifies content in a SharePoint site—say, creating or modifying an item from a list—there is an opportunity for a developer to respond to this user action with an event handler that executes server-side logic written in C# or Visual Basic.

So here we will make use of the list events to modify the workflow association data and start the workflow.

Creating a list event:

  1.  Open visual studio
  2.  Create a new project with project type as class library.
  3.  Add reference tot he class library Windoes Sharepoint Services(Microsoft.Sharepoint.dll)

Sample code

Override the Item added event in this scenario because we are going to start the workflow when a leave request is being made.

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using Microsoft.SharePoint;

using Microsoft.SharePoint.Workflow;

using System.IO;

using System.Diagnostics;

namespace DynamicApproval

{

public class LeaveApproval : SPItemEventReceiver

{

public override void ItemAdded(SPItemEventProperties properties)

{

try

{

SPSite objSiteCollection = new SPSite("Your Sharepoint Site URL");

SPWeb objSPSite = objSiteCollection.OpenWeb();

SPList objList = objSPSite.Lists[properties.ListId];

 

//Disabing the event firing during the process.

this.DisableEventFiring();

objSPSite.AllowUnsafeUpdates = true;

 

SPListItem objLeaveItem = properties.ListItem;

string LeaveRequestor = Convert.ToString(objLeaveItem["Employee name filed in the List"]);

//Getting the approver from the list where the employee information is maintained.

//If you have a well structured Active directory you can query the AD

//and get the respective superviosr of the employee.

string Approver = GetApprover(LeaveRequestor);

//Setting the due date

DateTime dt = System.DateTime.Now;

DateTime dtnew = dt.AddDays(7);

string strDueDate = dtnew.ToShortDateString();

SPWorkflowAssociation objAssociationTemplate = objList.WorkflowAssociations["Workflow Index or the Association GUID"];

//Sample association data.

//Asssociation data should be a well structured XML.

//Supplying the approver to the association data.

//In the same way you can add any number of approvers with a new <my:Person> tag thus making it as a multi level.

string AssociationData = "<my:myFields xml:lang=\"en-us\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:my=\"http://schemas.microsoft.com/office/infopath/2003/myXSD\">\r\n <my:Reviewers>\r\n \r\n <my:Person>\r\n <my:DisplayName>";

AssociationData = AssociationData + Approver + "</my:DisplayName>\r\n <my:AccountId>" + Approver + "</my:AccountId>\r\n <my:AccountType>User</my:AccountType>\r\n </my:Person></my:Reviewers>";

AssociationData = AssociationData + "\r\n <my:CC></my:CC>\r\n <my:DueDate xsi:nil=\"false\"></my:DueDate>\r\n <my:Description></my:Description>\r\n <my:Title></my:Title>\r\n <my:DefaultTaskType>1</my:DefaultTaskType>\r\n <my:CreateTasksInSerial>true</my:CreateTasksInSerial>\r\n <my:AllowDelegation>true</my:AllowDelegation>\r\n <my:AllowChangeRequests>true</my:AllowChangeRequests>\r\n <my:StopOnAnyReject>true</my:StopOnAnyReject>\r\n <my:WantedTasks xsi:nil=\"true\"></my:WantedTasks>\r\n <my:SetMetadataOnSuccess>false</my:SetMetadataOnSuccess>\r\n <my:MetadataSuccessField></my:MetadataSuccessField>\r\n <my:MetadataSuccessValue></my:MetadataSuccessValue>\r\n <my:ApproveWhenComplete>true</my:ApproveWhenComplete>\r\n <my:TimePerTaskVal>" + strDueDate + "</my:TimePerTaskVal>\r\n <my:TimePerTaskType xsi:nil=\"true\"></my:TimePerTaskType>\r\n <my:Voting>false</my:Voting>\r\n <my:MetadataTriggerField></my:MetadataTriggerField>\r\n <my:MetadataTriggerValue></my:MetadataTriggerValue>\r\n <my:InitLock>false</my:InitLock>\r\n <my:MetadataStop>false</my:MetadataStop>\r\n <my:ItemChangeStop>false</my:ItemChangeStop>\r\n <my:GroupTasks>true</my:GroupTasks>\r\n</my:myFields>";

//Starting the workflow.

objSiteCollection.WorkflowManager.StartWorkflow(objLeaveItem, objAssociationTemplate, AssociationData, true);

}

catch (Exception ex)

{

EventLog.WriteEntry("Starting Workflow", ex.Message, EventLogEntryType.Error);

}

}

/// <summary>

/// Getting the supervisor name of the employee from a sharepoint list.

/// </summary>

/// <param name="Employee">Name of the employee who submits the leave.</param>

/// <returns>login name of the approver.</returns>

private string GetApprover(string Employee)

{

string approver = string.Empty;

SPSite objSiteCollection = new SPSite("Sharepoint Site");

SPWeb objSPSite = objSiteCollection.OpenWeb();

SPList objApproverList = objSPSite.Lists["Employee information List Name"];

SPListItemCollection Collection = objApproverList.Items;

foreach (SPListItem item in Collection)

{

string EmployeeinList = Convert.ToString(item["Employee Name Field in the List"]);

if (EmployeeinList.ToLower().Trim() == Employee.ToLower().Trim())

{

string Approver = Convert.ToString(item["Approver field Name"]);

//Since the shapoint list item gives the person or name field name with id;Name format

//and hence we need to find out the login name of the approver for submitting to the workflow.

//The Id is being retrieved from the name returned using the substring.

int approverID = Convert.ToInt32(Approver.Substring(0, approverID.IndexOf(';')));

//Will return the user information based on the ID.

SPUser user = objSPSite.SiteUsers.GetByID(approverID);

if (user != null)

{

approver = Convert.ToString(user.LoginName);

}

break;

}

}

return approver;

}

}

}

Register the item added event to your list or library where the workflow is configured.

Now when an employee submits a new leave request, it will select the appropriate supervisor and starts the workflow.

Hope this will help in configuring the out of the box SharePoint approval workflow with dynamic approvers and also to configure any levels with the out of the box approval workflow capabilites rather than creating a new one from scratch.

This post is written by Sandeep Komalan. Sandeep is a Senior Technical Analyst – Web Application in the Microsoft SharePoint Practice at Ignify. Ignify has over 300 person years of SharePoint experience and internally leverages SharePoint as a tool to collaborate across all its offices and for all its projects. For help on SharePoint Services email us at sharepoint@ignify.com

Get Adobe Flash playerPlugin by wpburn.com wordpress themes