SharePoint – Understanding Data View Web Part in SharePoint Designer

December 31, 2013

Let’s see how we can connect a Display Form for a list to a Data View Web Part (DVWP).

First create a new Display Form for your respected listed.


Next insert a new DVWP using the list you want to link to.


Next you add or remove the columns to display.


Add a new Parameter using the Query String Source. In this case the ID field.


And last add a new Filter. Where you select the Form Field to send to the Query String Parameter to filter the DVWP list.


TIP : When defining the filter Value field, make sure you browse to the bottom of the drop down list, in order to see the Filter Parameter Value option.

This result looks like this.


Enjoy !

SharePoint – w3wp.exe Unable to authenticate on target name Event ID 6034

December 27, 2013

Had SharePoint interact with Word QuickParts to do some Field Merging. And this did not get going Sad smile

So it must have had something to do something with security. After investigating the ULS logs I saw some ‘401’ errors appearing.

Next was to jump to the EventViewer to check it out. And this one was clearly in the middle.

LsaSrv – EventID 6037



Adding this regkey solved all issues

  1. Go to REGEDIT and open the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0
  2. Right click MSV1_0 –> New -> Multi-String Value
  3. Type BackConnectionHostNames and click Enter.
  4. Right click on newly created value and select Modify.
  5. Enter the hostname of the site: WEBSITENAME (and on a new line enter the FQDN,
  6. Restart IIS


SharePoint – Return a Lookup Column Value as Text

December 21, 2013

The most annoying thing in SharePoint is that if you have a lookup column value in a list. And you want to retrieve this value as a text it will not work OOTB.

Let’s see here what I mean :

When you want to show a lookup column called CRM_Account using the standard “xsl” syntax.

           <xsl:variable name=”ID”>
            <xsl:call-template name=”ResolveId”>
                <xsl:with-param name=”thisNode” select=”$thisNode” />
    <xsl:value-of select=”$thisNode/@CRM_Account”/>

You get this onclick=”OpenPopUpPage Hyperlink result, instead of the text of the lookup column.


When you add this xsl syntax you will get the correct text representative of the lookup column value. 

<xsl:value-of select=”substring-before(substring-after($thisNode/@*[name()=current()/@Name],’&gt;’), ‘&lt;’)” disable-output-escaping=”yes”/>

How to set a variable and set a value to retrieve in a new column.

Set a variable called CRM_ID and put the CRM_Account_ID in there, last is to retrieve it.

<xsl:variable name=”CRM_ID”><xsl:value-of select=”$thisNode/@CRM_Account_ID”/></xsl:variable>

<xsl:value-of select=”$CRM_ID”/>

Enjoy !

SharePoint – Start Workflow from a Dynamic Hyperlink in a list

December 19, 2013

Ever wanted to start a Workflow from a Hyperlink in a list, that is filled dynamically with the URL and the corresponding ID of the ITEM.

Ok let’s go

Op SharePoint Designer and go the list you want it to happen. Next open the VIEW where you want to add the Hyperlink Column.


Go to the Columns section and right click the first column, and select Insert to the Left.


Next make sure you have the SP Toolbox available if not; Go to Tasks Panes and Select Toolbox. And Drag & Drop a LinkButton in the new column.


The code will look as follows

<asp:LinkButton runat=”server” id=”LinkButton1{$ID}{generate-id()}”</asp:LinkButton>

Modify it to trigger the Workflow URL and parameter

Add the PostBackURL=” “ URL & Parameter


The Parameter is this case is = {$thisNode/@ID}

The result looks like this.


And works like this when clicking.



If you embed the List View in another Page using insert WebParts .You need to add the custom column again in that page !! It will not be automatically added if you did the change in the original View.


SharePoint – Custom Action in Ribbon

December 18, 2013

Ever wanted to PRINT your list or your custom Form you created.

Well the easiest way would be to add a Custom Print Action to your ribbon or List menu.

To start open the relevant list or form in Sharepoint Designer. In this example it will be a list.

Add a new Custom VIEW Ribbon action


Call it “Print” and add this simple JavaScript to the Navigate URL.


alert('I am Printing now !');

Important is that you add this Ribbon Location :



Don’t forget to add your 32bit icon and save it.


Next go to have a look at the result and test it.



The same procedure goes for a form only the Custom Action location is different.

SharePoint – Redirect Workflow Page after starting

December 16, 2013

Sometime you create a Workflow (WF) and you don’t want it to redirect to the initial list where it was started from.

But rather to a Display Form or an Edit Form of the record that triggered the WF.

Let’s see how to redirect a workflow to a different page after starting.

1. In the style sheet create a parameter that will contain the URL of the form to which to redirect to :

<xsl:variable name=”RedirectDisp“>../../Lists/YourList/DispForm.aspx?ID=<xsl:value-of select=”$Id“/></xsl:variable>

Where $ID is the ID of the list item

2. Then change the start button from the WF page :

<td nowrap=”nowrap” class=”ms-vb”>
<input type=”button” value=”Start” name=”btnSave” onclick=”javascript: {ddwrt:GenFireServerEvent(concat(‘__insert;__commit;__redirectsource;__redirectToList={‘,ddwrt:EcmaScriptEncode($ListName),’};‘))}” />



<td nowrap=”nowrap” class=”ms-vb”>
<input type=”button” value=”Start” name=”btnSave” onclick=”javascript: {ddwrt:GenFireServerEvent(concat(‘__insert;__commit;__redirect={‘,$RedirectDisp,’}‘))}” />


That’s it.

SharePoint – Workflow Event manager error

December 12, 2013

SharePoint Workflow – On Event Change issues !!

In a custom SharePoint Application we encountered the problem that a Workflow connected to a list.

Which was part of the Custom SP application was not starting based on a ON CHANGE event.

Every time we changed the record we saw this in the ULS.

Event manager error: That assembly does not allow partially trusted callers.


Solution is to go the the %windir%\assembly Directory and Drag & Drop the DLL in there. This will register them without the need of the GacUtil.exe


Do a IISReset and test again.

It it did not solve the issue you need to go a more insecure approach but more effective for sure.

Open the IIS Manager go to your Web Application, right click and choose Explore.


You will end up in the correct folder where you can pick up the web.config file.

Find this entry :

<trust level=”WSS_Custom” originUrl=”” />

And change “WSS_Custom” to “Full

Enjoy !