URL strings to launch List forms on OOB List views pointing to Infopath forms with multiple views

To use these strings on an OOB List View, add 2 column manually and insert preferred method below between the table data tags.It makes it easier to insert 2 columns to the left of Title in my case and leave first one empty and drop these tags in second one.

There is a bug in SharePoint Designer that adds ?ID=4&&&&&&. so to work around this you need to use copy and replace to change the values. The other woraround seemed to be to use the xslt designer that pops up when editing the ?ID={, very weird!!

To speed up the process of creating multiple views from the first one I noticed you cannot really use SPD to copy and paste a working view. This is really buggy. you need to create your views in the ui and then add the button code below. Another bugger is if you add a new view in SPD you get no fields, better off in UI and create view from existing.

This is my prize link for a custom edititem.gif link on a out of box list view.

<td style="width: 60px">

    <xsl:variable name="ID">
<xsl:call-template name="ResolveId">
<xsl:with-param name="thisNode" select="$thisNode" />
</xsl:call-template>
</xsl:variable>
<a href="javascript:OpenPopUpPage(‘/sites/projects/17/Lists/ProjectWorkItems/EditForm.aspx?ID={$ID}&amp;DefaultView=Action Items’)" > <img src="/_layouts/images/edititem.gif" class="style1" /></a>

</td

Add this sytle to this content area to hide picture borders
<asp:Content ContentPlaceHolderId="PlaceHolderBodyAreaClass" runat="server">

<style type="text/css">
.ms-bodyareaframe {
    padding: 0px;
}
.style1 {
    border-width: 0;
}
</style>

</td

This sucker Worked with Form Action Button on an out of box List view,

<td style="width: 66px">

<xsl:variable name="ID">
<xsl:call-template name="ResolveId">
<xsl:with-param name="thisNode" select="$thisNode" />
</xsl:call-template>
</xsl:variable>
<input type="button" value="Form Action" name="btnFormAction" onclick="javascript: OpenPopUpPage(‘/sites/projects/17/Lists/BPProjectWorkItems/EditForm.aspx?ID={$ID}&amp;DefaultView=Task’);"/>
                   
</td>

 

This one works on custom dvwp on a list view

<a href="/sites/projects/17/Lists/BPProjectWorkItems/EditForm.aspx?ID={@ID}&amp;DefaultView=Task&amp;Source=http://bp.rlan.ca/sites/projects/17/Lists/BPProjectWorkItems/Tasks.aspx"><img src="/_layouts/images/edititem.gif" class="style1" /></a>

Advertisements