Posts

Showing posts from December, 2011

How to create workflow in Visio and import it in Sharepoint Designer 2010 - Part 2

Image
In previous blog we saw how to create and export the workflow diagram in Visio 2010 ( How to create workflow in Visio and import it in Sharepoint Designer 2010 - Part 1 ). In this blog we import workflow file in SharePoint Designer 2010. Open SharePoint Designer 2010 -> Click on "Open Site" -> In open site window enter site URL on which you want to import the workflow. Click on "Workflows" in Navigation -> Click on "Import from Visio" button from top ribbon -> In Import workflow from Visio Drawing browse the path of export file and click on Next button. In this screen Click on List Workflow and from drop down select "Reimbursement Request" list and click on finish. After click on finish you got following workflow view now we have to set the condition and values for this imported workflow. ...

Content type hub problem with Blank Site Template

As I mentioned in how to deploy content type hub in my previous blog (" Content Type Hubs Publishing in Sharepoint 2010 "), after following blog content type is not appearing on site may required to activate the Taxonomy feature on that site, following command required to activate the feature STSADM -o activatefeature -id 73EF14B1-13A9-416b-A9B5-ECECA2B0604C -url http:// -force Power Shell Command Enable-SPFeature -id 73EF14B1-13A9-416b-A9B5-ECECA2B0604C -URL Hope this work for you also.... Good luck :-)

How to setup content type publishing hub in SharePoint 2010

Image
What is Content Type Hub ? Content type hub is new feature of SharePoint 2010 to manage content type centrally (Content Type Gallery) and publish them to subscribed sites. Prerequisite : Create two web application on two separate port number. we called site A as publisher and site b as subscribed site. Create content type on site A called "Content Type Hub Demo" of document base type.  Create service to deploy content type hub   Open SharePoint 2010 Central Administration - > Click on Manage service applications under Application Management section -> Click on New and select Managed Metadata Service On "Create New Managed Metadata Service" window change following values Name : Content Type Hub Database Name : Content_Type_Hub_Database Use existing application pool: SharePoint Web Service Default Content Type hub : "Enter the url of web site which going to act as publisher for content type". Click on "Ok" button ...

How to create workflow in Visio and import it in Sharepoint Designer 2010 - Part 1

Image
This blog shows how easy to create a workflow in  Microsoft Visio 2010 and import it in Sharepoint Designer 2010. This part contains the prerequisites required and how to design workflow in Microsoft Visio 2010. In this blog we create work for "Reimbursement of Expenses", if my expense amount is less then specified limit then request is directly approved otherwise it goes to Department Head for approval. Prerequisites : I create custom list called "Reimbursement Request" and added following field into it. "Description" type of Multiple lines of text. "Expense Amount" type of Currency. "Authorized" type of  "Yes/No". "Department Head" type of "person and Group". Design workflow with Microsoft Visio : 1. Open Microsoft Visio 2010 : Click on Start -> All Programs -> Microsoft Office -> Click on "Microsoft Visio 2010". 2. Create "Microsoft Sharepoint Workflow" ...

Connect Chart Web Part to SQL database in Sharepoint 2010

Image
1. This blog shows you how to provide data for OOB Charting Web part in Sharepoint 2010. First insert the chart web part into you page as shown in fig. below 2. Create custom web part and specify the database connection as I am retrieving chart data from sql server 2008 database. Copy paste following code into webpart and deploy web part to site collection [ToolboxItemAttribute(false)]     [Serializable]     [AspNetHostingPermission(SecurityAction.Demand, Level = AspNetHostingPermissionLevel.Minimal)]     [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]     public class ChartDataProviderWebPart : WebPart, IWebPartTable     {         SqlDataAdapter sda;         Timer _timer;         DataTable _table;   ...

How to programmatically associate a workflow to a list in Sharepoint

In one of your project we have to attach "Sharepoint approval workflow" to list when feature is activated on the web. Prerequisite : SharePoint 2007 Workflows activated on site collection level Task list of content type Task, for storing task created to users.   private void SetWorkFlow(SPWeb web, string listName)         { web.AllowUnsafeUpdates = true; string workflowAssocName = string.Format("{0} - Sharepoint Approval", listName); SPWorkflowTemplate workflowTemplate = web.WorkflowTemplates.GetTemplateByName("Approval - SharePoint 2010", System.Globalization.CultureInfo.CurrentCulture); SPList myList = web.Lists[listName]; // Try to get workflow history and task list SPList historyList = web.Lists["Workflow History"]; SPList taskList = web.Lists["Tasks"]; // Create workflow association SPWorkflowAssociation workflowAssociation = SPWorkflowAssociation.CreateListAssociation( workflowTemplate, workflowAssocName, ...