Friday, February 22, 2013

SharePoint 2010 Linked Data Source item link field

For Direct Page:

<a href="{@FileDirRef}/DispForm.aspx?ID={@ID}" ONCLICK="GoToLink(this);return false;"><xsl:value-of select="@Title" /></a>


For Popup:


<a href="javascript:OpenPopUpPage('{@FileDirRef}/DispForm.aspx?ID={@ID}');"><xsl:value-of select="@Title"/></a>

Monday, February 18, 2013

How to cancel all existing Work Flows on an item

 // Terminate all existing In-Progress workflows.
 foreach (SPWorkflow workflow in item.Workflows)
 {
   SPWorkflowManager.CancelWorkflow(workflow);
 }

Thursday, February 14, 2013

SharePoint 2010 Workflow cannot compare multiple Person filed

Please note that if the person field is only single user field. The comparison seems to be working. If you want you can write a custom activity to do that.

Thursday, February 7, 2013

how to turn on developer dashboard



Using STSADM

Open a command window to the %ProgramFiles%\Common Files\Microsoft Shared Debug\Web Server Extensions\14\BIN directory and enter one of the following commands, depending on the desired display mode.



Mode
Command
On
stsadm -o setproperty -pn developer-dashboard -pv on
OnDemand
stsadm -o setproperty -pn developer-dashboard -pv ondemand



REF:
http://msdn.microsoft.com/en-us/library/ff512745(v=office.14).aspx

Tuesday, February 5, 2013

How to open SharePoint Page in WebPart Maintenance Mode

Maintenance page can be opened by adding the following query string to the page URL

?contents=1