2010年8月20日 星期五
How to change SharePoint view to click title and enter edit mode
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$XmlDefinition/List/@TemplateType != 301">
<a onfocus="OnLink(this)" href="{$FORM_DISPLAY}&ID={$ID}&ContentTypeID={$thisNode/@ContentTypeId}" onclick="EditLink2(this,{$ViewCounter});return false;" target="_self">
<xsl:call-template name="LinkTitleValue.LinkTitle">
<xsl:with-param name="thisNode" select="$thisNode"/>
<xsl:with-param name="ShowAccessibleIcon" select="$ShowAccessibleIcon"/>
</xsl:call-template>
</a>
</xsl:when>
<xsl:otherwise>
<a onfocus="OnLink(this)" href="{$FORM_DISPLAY}&ID={$ID}" onclick="GoToLink(this);return false;" target="_self">
<xsl:call-template name="LinkTitleValue.LinkTitle">
<xsl:with-param name="thisNode" select="$thisNode"/>
<xsl:with-param name="ShowAccessibleIcon" select="$ShowAccessibleIcon"/>
</xsl:call-template>
</a>
</xsl:otherwise>
change to these code:
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$XmlDefinition/List/@TemplateType != 301">
<a onfocus="OnLink(this)" href="{$FORM_EDIT}&ID={$ID}&ContentTypeID={$thisNode/@ContentTypeId}" onclick="EditLink2(this,{$ViewCounter});return false;" target="_self">
<xsl:call-template name="LinkTitleValue.LinkTitle">
<xsl:with-param name="thisNode" select="$thisNode"/>
<xsl:with-param name="ShowAccessibleIcon" select="$ShowAccessibleIcon"/>
</xsl:call-template>
</a>
</xsl:when>
<xsl:otherwise>
<a onfocus="OnLink(this)" href="{$FORM_EDIT}&ID={$ID}" onclick="GoToLink(this);return false;" target="_self">
<xsl:call-template name="LinkTitleValue.LinkTitle">
<xsl:with-param name="thisNode" select="$thisNode"/>
<xsl:with-param name="ShowAccessibleIcon" select="$ShowAccessibleIcon"/>
</xsl:call-template>
</a>
</xsl:otherwise>
2010年3月30日 星期二
Visual Studio 2010 SharePoint project error - The language-neutral solution package was not found
We sometimes get this error when deploying SharePoint 2010 solutions from Visual Studio 2010:
Error occurred in deployment step ‘Retract Solution’: The language-neutral solution package was not found.
You can run get-spsolution powershell command without parameters to see which solutions are currently installed in the farm.Therefore you can use this powershell command to delete this solution manually:
(get-spsolution mysolution.wsp).Delete()
2010年3月28日 星期日
How to add solution file (.wsp) to SharePoint 2010
If we need to add a solution file to SharePoint 2007, we use stsadm command as following:
stsadm –o addsolution –name SharePointProject.wsp
In SharePoint 2010, the powershell command is as following:
Add-SPSolution c:\SharePointProject.wsp
In this case you don’t actually have to type –literalpath before the parameter. This is what it looks like when executed. You can see that it displays the id of the solution along with its deployment status.
After you add solution package to server farm, you can deploy in central administartion->System setting->farm solution management.
If you retract your solution fail by central administration page, you can use power shell tool to retract your solution. However, powershell doesn't have retract command anymore. Please use uninstall.
Uninstall-SPSolution –Identity SharePointProject.wsp –WebApplication http://sp2010
If you just need to update your solution file, you can use this code as following:
Update-SPSolution –Identity SharePointProject.wsp –LiteralPath c:\SharePointProject.wsp –GACDeployment
2010年3月21日 星期日
Custom form fields of a SharePoint list

You're not able to see the filed in this list. If you want to set some field as hidden or readonly, how to do this task?
- Open this form and select a area that you want to put form field.
- Click Insert->SharePoint Controls->Custom List Form
- Choose List or Document Library Form you'd like to display
- This form's field will showed in this page. You can edit properties in this page.
- Select the original form ListFormWebPart property, tick hidden in layouts section.
Sharepoint designer cannot create workflows: "access denied"
You're a site owner and you want to create a workflow in your site, but get error:Access denied.
Solution:
Make sure you have site collection administrator permission or contact your site collection administration.
- Open your site by SharePoint Designer.
- Right click Workflow node in Folder list and select "Properties."
- Select "Manage permission using the browser" in security tab.