Search This Blog

Friday, June 18, 2010

Display Attachments in SharePoint designer XSL DataView

While creating DataView for any List in Sharepoint designer when we add attachment field it shows the values True or False.
To fix this issue & display actual attachment, go to code view of dataview & add following XSL code for attachment field:

Single Item View:
<SharePoint:AttachmentsField ControlMode="Display" ItemId="{@ID}" EnableViewState="true" FieldName="Attachments" runat="server"/>

Multiple Item View:
<SharePoint:AttachmentButton ControlMode="Edit" Enabled="true" ItemId="{@ID}" runat="server" Visible="false"/><SharePoint:AttachmentsField ControlMode="Display" ItemId="{@ID}" EnableViewState="true" FieldName="Attachments" runat="server"/>

Note: use appropriatefor single item view or multiple item view

Saturday, June 5, 2010

Add BCC option in SharePoint Workflow Email

BCC option is not available in Send an Email activity of SharePoint Designer workflow. But this can be achieved with little bit tweaking of .xoml file of respective workflow.

Do following steps:
  • Create new workflow using SharePoint designer & add Send an Email activity
  • Specify values in To & Cc fields of Email compose box & save the worlkflow
  • Open .xoml file of workflow & find BCC & CC values(BCC value should be null)
  • Swap the values to CC & BCC & save the .xoml file
  • Again open the Workflow with wizard, you will see CC value of Email activity is empty(null).
  • Compile the rest of email body & finish the workflow compilation wizard.
Now email will be sent as BCC.

Option that are not supported SharePoint Designer Workflow Email

The following options are not supported by the current version of the Send an Email action:

  • Specifying an address on the From line. (E-mail messages sent by the workflow always show the e-mail address specified by the server administrator on the From line. Only the server administrator can change this, and it can only be changed for all notifications in the current Web application, not per workflow.)
  • Including a hyperlink to the Workflow Status page. (There is no way to use a workflow lookup to supply the value of the WorkflowInstanceID variable in the query string.)
  • Using an embedded cascading style sheet (CSS) to format message content. (Text can be formatted by using the style attribute, but the <style> tag and CSS classes are not supported.)
  • Using a workflow lookup in either the To or CC box that references a column of the Person or Group type that contains multiple values.
  • Specifying a Bcc (blind carbon copy) recipient for a message. (A developer can modify the .ACTIONS file on the server to include a Bcc field, but this cannot be done in the Workflow Designer.)
  • Including another file with a message as an attachment.
  • Embedding image or graphic files in a message.
For more information visit : http://office.microsoft.com/en-us/sharepointdesigner/HA102390421033.aspx

Thursday, June 3, 2010

Grouping on People/Group field in SharePNoint XSLT DataView

While grouping SharePoint DataView on People/Group type column(field) , it doesn't produces the expected result. The result comes out as one group for each row in the SharePoint list.
To fix this issue replace following XSL code in dateview:
<xsl:variable name="NewGroup_adhoc">

<xsl:choose>

<xsl:when test="$dvt_groupfield">

<xsl:value-of select="ddwrt:NameChanged(string(*[name()=$dvt_groupfield] | @*[name()=$dvt_groupfield] | current()[name(.) = $dvt_groupfield]), 0)" /></xsl:otherwise>

<xsl:otherwise></xsl:otherwise>

</xsl:choose>

</xsl:variable>


with following

<xsl:variable name="NewGroup_adhoc">

<xsl:choose>

<xsl:when test="$dvt_groupfield">

<xsl:choose>

<xsl:when test="contains($dvt_groupfield, 'Owner')"> <xsl:value-of select="ddwrt:NameChanged(string(substring-before(@Owner,'</A>')), 0)"/></xsl:when>

<xsl:otherwise><xsl:value-of select="ddwrt:NameChanged(string(*[name()=$dvt_groupfield] | @*[name()=$dvt_groupfield] | current()[name(.) = $dvt_groupfield]), 0)" /></xsl:otherwise>

</xsl:choose>

</xsl:when>

<xsl:otherwise></xsl:otherwise>

</xsl:choose>

</xsl:variable>




Note: Owner is the people on which grouping is done

SharePoint Fantastic 40 templates:


SharePoint Fantastic 40 templates:

Here is the link :
http://www.wssdemo.com/application/default.aspx

Cheers !

SharePoint internet sites

SharePoint Internet Sites By Industry:
http://www.wssdemo.com/SitePages/SitesByIndustry.aspx

New SharePoint Websites:
http://www.wssdemo.com/SitePages/New%20Sharepoint%20Websites.aspx