Wednesday, October 29, 2008

How to use SharePoint Workflow UpdateTask

Update task activity in SharePoint workflow use to update task without getting locked. But there is a issue when changing task user for the task item.

In order to Update Task, follow these steps:

Follow below settings for UpdateTask Activity:

  • Correlation Token: Same as of Create Task activity
  • Task ID: Same as of Create Task activity

Insert a Code Activity before Update Task activity.

In Code Activity, write below code:

Code Snippet

updateTask.TaskProperties.AssignedTo = @"domain\username";

Note : This is for the change task user (Approver)

Monday, October 27, 2008

Adding Navigation to ECB as Feature

Adding Navigation to Document Library Menu.

There are number of scenarios that you have to link document library item to custom application page with the list id and the item id. There are two option that have for this.

1. Adding Content Query Web Part ( now i cannot remember how to do this)
2. Adding feature as Custom Action to the ECB.

im going to discuss about how to do it using feature.

In here im writing element.xml it is up to you define the feature and the activate it inside the farm.


<customaction id="MyApplication.ECBItemMenu"
registrationtype="List"
registrationid="101"
location="EditControlBlock"
sequence="105"
title="MyApp Page">

<urlaction url="~site/_layouts/CustomApplicationPages/ApplicationPage4.aspx ?ItemId={ItemId}&ListId={ListId}">
</urlaction>

</customaction>


But this ECB menu will appier only to the document library items. If you need this add to list item, you have to extend this using "Item" content type id. This figure show you content type ids for the base content types in the SharePoint. What you have do is change your "registrationtype" and "registrationid".




This will add this ECB menu to your custom list.


<customaction id="MyApplication.ECBItemMenu"
registrationtype="ContentType"
registrationid="0x010"
location="EditControlBlock"
sequence="105"
title="MyApp Page">

<urlaction url="~site/_layouts/CustomApplicationPages/ApplicationPage4.aspx ?ItemId={ItemId}&ListId={ListId}">
</urlaction>
</customaction>


This are the examples of them


We can add ECB menu to the Dislpay, Edit item form also.

Sunday, October 12, 2008

Create Custom Site Definition for SharePoint with Custom MasterPage

There are situations in SharePoint World we have to use same customized master page for every SharePoint site in the organization. Customizing master page using SharePoint designer is take time and its too hard to maintain. As a solution for the you can introduce new SharePoint Site Definition for your organization. Using that you will be able to use same look and feel for each and every site that you going to create for your organization.

(Visual Studio 2008 extensions for Windows SharePoint Services 3.0 (version 1.2)




Then open wsp view of the solution. If wsp view not visible in the project you can open it from View à Other Windows à WSP View (CTRL+W,I)


Then open webtemp.xml (webtempMyCustomDefinition.xml)


Then change it titel as relevent ( this step is not nessasry )



Now you are ready to deploy your solution.


Deploy your solution using Visual Studio.


Chake follwing folders after complte deploymet


“MyCustomDefinition” at

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\SiteTemplates\


webtempMyCustomDefinition.xml file at

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\1033\XML


Make sure to IISRESET

Now you are ready to create new web site using new custom site definition.

Change Deployment tab in template selection .



Thursday, October 9, 2008

ASP.NET AJAX 3.5 and AjaxControlToolkit with SharePoint

Enabling Ajax in the SharePoint application was the challenge for the developers. But now technology is difference and life is more easier . Now you can use ASP.NET Ajax extension features inside the SahrePoint

How to :

1.) Follow the instructions in the following SharePoint Team Blog post:

Integrating ASP.NET AJAX with SharePoint

2.) Add th
e following assembly bindings to your SharePoint web.config. (This will redirect your AJAX 1.1 assemblies to use AJAX 3.5.)

2.) Add the following assembly bindings to your SharePoint web.config. (This will redirect your AJAX 1.1 assemblies to use AJAX 3.5.)



<configuration >
<runtime >
<assemblyBinding >
<dependentAssembly >
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/ >
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/ >
</dependentAssembly >
<dependentAssembly >
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/ >
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/ >
</dependentAssembly >
</assemblyBinding >
</runtime >
</configuration >



Keep this link also in mind http://daniellarson.spaces.live.com/


Happy coding .............