This post applies to Microsoft Office SharePoint Server 2007 and WSS 3.0

Scenario: You have a SharePoint List that is being used to track some kind of business information to automate a business process. The business process requires that once a user adds a new item to a list a workflow executes that sends an e-mail to an approver (or some other person involved in the process). The e-mail will include a link inside it that will take the user to a Custom .aspx page stored in a document library. Once the Custom .aspx page opens, it should display the specific List Item needed for review/edit. HOW DO YOU DO THIS?

Solution: The first thing you would need to do is set some things up on the Custom .aspx page. The Custom .aspx page should include a “Single Item Form”. This allows you to edit the data inside the list with a “Save” and “Cancel” button already created. In the upper right hand corner of the single item form (Data Form Webpart), you will see the drop-down for the “Common Data View Tasks”.

First, you will need to create a “Parameter” by clicking the “Parameters” link – then the “New Parameter” button. Choose “Query String” from the drop-down under the “Parameter Source” option. Now give it a name and enter something in the “Query String Variable” text box. The Query String Variable is what will be used in the URL later to identify the item (so make note of it). For web programmers, this is basically a GET variable used in the URL to supply a value later.  

Now you will need to define the Filter to use the parameter – so click the “Filter” link under the Common Data View Tasks. Once inside the “Filter Criteria” dialog, choose “ID” as the Field Name. Now under the “Value” drop-down – choose the parameter name that you just defined. This now associates a filter with the ID of the List item that will be defined by using the parameter variable. Save the Custom .aspx page.

Finally, you will need to modify the workflow that sends the e-mail when a new item is added. The workflow activity will obviously be an e-mail. Inside the body of the e-mail you will need to add something similar to the following:

<a href=”http://servername/sites/organizationsitecollection/SharedDocuments/Custom.aspx?parametername=[ID]“>Click Here</a>

Where parametername is the name of the parameter that you defined above. The [ID] portion of the URL tagged above should be added by using the “Add Lookup to Body” button. You should then lookup the ID field to be added. It will not work if you simple just type [ID]. Now save your and re-upload your workflow.

Now when you add a new item to a list an e-mail will be sent to the required user with a link in it that will take you directly to the Custom.aspx page that will be loaded with a Specific Item.

Tags Categories: SharePoint Posted By: Clinton Daniel
Last Edit: 14 Apr 2009 @ 06 33 PM

E-mailPermalinkComments (0)

This post applies to Microsoft Office SharePoint Server 2007 and WSS 3.0

Scenario: You have built a Custom .aspx page using SharePoint Designer that is stored in a Document Library. You have added the Default Master page to the Custom page so that your css is consistent with the rest of the SharePoint pages on your site. You have added a data source that is a SharePoint list that will be displayed on the page as a single item data view. When viewing the Custom .aspx page you are unable to view the links that would be included as the attachments. The attachment links are normally viewable on a standard DispForm.aspx that is generated by a list, but not in this case. HOW DO YOU DISPLAY THE ATTACHMENT LINKS?

Solution: I’ve done a lot of searching blogs and documentation on this problem. I’ve given up on it several times. However, after finding some hints and information on some blogs I’ve been using the following solution. You will have to open the Custom .aspx page in code view. When SharePoint Designer adds the “Single Item View” it generates an xsl tag coded as <xsl:template name=”dvt_1.rowview”>  . This can be found at the top of the view inserted. Once you locate this tag, immediately after it insert the following code:

<tr>
          <td width=”190px” valign=”top” class=”ms-formlabel”>
           <h3 class=”ms-standardheader” style=”width: 163px; height: 12px”>
            <nobr>Attachments</nobr>
           </h3>
          </td>
          </tr>
          <tr>
          <td width=”400px” valign=”top” class=”ms-formbody”>
           <SharePoint:AttachmentsField ControlMode=”Display” FieldName=”Attachments” runat=”server” Visible=”true”/>
          </td>
          </tr>

Save the file and reload it in your browser. You should now see the attachments link in your Single item view.

Tags Categories: SharePoint Posted By: Clinton Daniel
Last Edit: 14 Apr 2009 @ 05 52 PM

E-mailPermalinkComments (2)
\/ More Options ...
Change Theme...
  • Users » 2
  • Posts/Pages » 16
  • Comments » 41
Change Theme...
  • VoidVoid
  • LifeLife « Default
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LiteLight
  • No Child Pages.