Posts RSS Comments RSS 16 Posts and 26 Comments till now

Microsoft Learning Content Development System LCDS

Microsoft have released as a community version a tool for developing e-learning courses.  If you’ve ever done any of the Microsoft E-Learning courses then this tool allows you to create your own courses.

What is the LCDS?

The Learning Content Development System (LCDS) is a tool that enables you to create high quality, interactive, online courses. Virtually anyone can publish e-learning courses by completing the easy-to-use LCDS forms that seamlessly generate highly customized content, interactivities, quizzes, games, and assessments—as well as Silverlight-based animations, demos, and other multimedia. Register to download the free LCDS release, then start creating your own e-learning courses today!

https://www.microsoft.com/learning/tools/lcds/default.mspx

 

Internet Explorer ActiveX Control C# Class Library

The following describes how to create a C# Class Library dll which you can use as an ActiveX Control in Internet Explorer It will automatically register itself on build and expose properties, methods and raise events to Internet Explorer. It implements the IObjectSafety interface to mark the control as safe for scripting within Internet Explorer. There are separate interfaces for events and properties and methods.

  1. Create a new C# Class Libray project in Visual Studio 2005.
  2. In the Project Properties for the Application click the “Assembly Information…” button and check the Make Assembly COM-Visible checkbox.
  3. In the Build Properties check the Register for COM Interop checkbox.

Here’s the code:


using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using System.Windows.Forms; 

namespace ActiveXControl
{
    [Guid("A59B958D-B363-454b-88AA-BE8626A131FB")]
    [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
    public interface ICOMEvents
    {
        [DispId(0x60020000)]
        void MyEvent();
    } 

    public delegate void MyEventHandler(); 

    public interface ICOMControl
    {
        void myMethod();
        string theTime { get; }
    } 

    [Guid("CB5BDC81-93C1-11CF-8F20-00805F2CD064")]
    [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
    public interface IObjectSafety
    {
        [PreserveSig]
        int GetInterfaceSafetyOptions(ref Guid riid, out int pdwSupportedOptions, out int pdwEnabledOptions); 

        [PreserveSig]
        int SetInterfaceSafetyOptions(ref Guid riid, int dwOptionSetMask, int dwEnabledOptions);
    } 

    [GuidAttribute("066700A6-4BD9-43fd-8839-E094E34E6773")]
    [ComSourceInterfaces(typeof(ICOMEvents))]
    public class Library : IObjectSafety, ICOMControl
    {
        public event MyEventHandler MyEvent;  

        private const int INTERFACESAFE_FOR_UNTRUSTED_CALLER = 0x00000001;
        private const int INTERFACESAFE_FOR_UNTRUSTED_DATA = 0x00000002;
        private const int S_OK = 0; 

        int IObjectSafety.GetInterfaceSafetyOptions(ref Guid riid, out int pdwSupportedOptions, out int pdwEnabledOptions)
        {
            pdwSupportedOptions = INTERFACESAFE_FOR_UNTRUSTED_CALLER | INTERFACESAFE_FOR_UNTRUSTED_DATA;
            pdwEnabledOptions = INTERFACESAFE_FOR_UNTRUSTED_CALLER | INTERFACESAFE_FOR_UNTRUSTED_DATA;
            return S_OK;
        } 

        int IObjectSafety.SetInterfaceSafetyOptions(ref Guid riid, int dwOptionSetMask, int dwEnabledOptions)
        {
            return S_OK;
        } 

        public string theTime
        {
            get { return DateTime.Now.ToString(); }
        } 

        public void myMethod()
        {
            if (MyEvent == null)
            {
                MessageBox.Show("MyEvent delegate is null");
            }
            else
            {
                MyEvent();
            }
        }
    }
} 

Now here is the html:


<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %> 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<script language="jscript" type="text/javascript">
function loaded(){
  alert(wembley.theTime());
}
</script>
<body onload="loaded()">
<object classid="clsid:066700A6-4BD9-43fd-8839-E094E34E6773" name="myControl" id="myControl"></object>
<input type="button" value="Call Method" onclick="wembley.myMethod()"></input>
</body>
<script for="myControl" event="MyEvent">
function myControl::MyEvent(){
  alert("Event Fired!");
}
</script>
</html>

Sharepoint Filtered List Lookup Field

This post explains how to create a filtered lookup field to another list using the Office Sharepoint Designer 2007 client.  This can be done without the need to write any code!

To start with we need to build 2 Lists in a Sharepoint site.  List A will be used as the target of the lookup and the other List B as the source.  Make sure you create some data in List A for our filtered lookup to find.

Open up Office Sharepoint Designer 2007 client and open the Sharepoint Site that contains the Lists.  Expand the Lists in the Folder List window, and then expand List B.  You should see the default files:

AllItems.aspx
NewForm.aspx
EditForm.aspx
DispForm.aspx

In this example we’re going to create a custom NewForm.aspx to put our filtered lookup field in, but you will need to update the EditForm.aspx and DispForm.aspx files as well.

Copy & Paste the NewForm.aspx and rename the pasted file to MyNewForm.aspx.  Edit MyNewForm.aspx and select the ListFormWebPart in the design pane and delete it.  From the Insert drop down menu choose Sharepoint Controls and select Custom List Form:

image

Select List B from the List to use form for and Edit item form for the type of form to create.

Now we need to setup a new data source for List A.  Select the Data Source Library task pane and expand Sharepoint Lists.  From the drop down options choose Copy & Modify…

image

Click the Filter button and setup the desired filter rules.  On the General tab give the new Data Source a new name.

Insert the new Data Source control onto the Page.

From the toolbox scroll down to Sharepoint Controls – Data View Controls, drag and drop a new Drop Down List onto the design pane.  Edit it’s Data Fields… and connect it to the Data Source we created earlier.  You need to be careful where you insert the Data Source onto the page or the Drop Down List control won’t be able to see it.

When you have saved the new form, we need to tell Sharepoint to use it in place of the standard new form.  Right click on List B in the Folder List pane and choose Properties.

image

Goto the Supporting Files tab and set the Content type specific forms to Item and then update the New Item form property.

When you create a new item in List B you should now see your custom form.

Sharepoint Sequential Number Service

This custom web service resides alongside the built in Sharepoint web services. It is used in combination with a Sharepoint List which provides a central place to manage the sequential numbers of any application name passed as a parameter to the web service.

It’s a good solution for providing a sequential number to an InfoPath form. Setup a data connection in InfoPath to the web service to return the next available number when the user saves the form. It can also be called from a Sharepoint Designer workflow action to assign a sequential number to a list item, infopath form or document.

This walkthrough uses a standard C# ASP.NET Web Service Application created in Visual Studio.

Create a new ASP.NET Web Service Application in Visual Studio. We need to add a reference to the backend Sharepoint classes in the following dll located on the Sharepoint server:

c:\program files\common files\microsoft shared\web server extensions\12\isapi\microsoft.sharepoint.dll

If you’re not developing on the Sharepoint server, take a local copy of the dll to reference in your project.

Here’s the code listing:


using Microsoft.SharePoint;
using System.Configuration;
namespace NumberService
{
    /// <summary>
    /// This web service returns a Sequential Number given an application name
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
    // [System.Web.Script.Services.ScriptService]
    public class SequentialNumber : System.Web.Services.WebService
    {
        /// <summary>
        /// The NextValue method increments the number in the configured list and returns the next number.
        /// </summary>
        /// <param name="title">The string name of the application to update.</param>
        /// <returns>A String containing the next available number</returns>
        [WebMethod]
        public string NextValue(string title)
        {
            double nextValue = 0;

            try
            {
                SPSite site = new SPSite("SPSiteUrl");
                SPWeb web = site.OpenWeb("/");
                bool allowUnsafe = web.AllowUnsafeUpdates;
                SPList numberList = web.Lists["Number Configuration"];

                foreach (SPListItem item in numberList.Items)
                {
                    if (item.Title == title)
                    {
                        try
                        {
                            web.AllowUnsafeUpdates = true;
                            nextValue = Convert.ToDouble(item["NextValue"]);
                            item["NextValue"] = nextValue++;
                            item.Update();
                        }
                        catch (Exception ex)
                        {
                            throw ex;
                        }
                        finally
                        {
                            if (!allowUnsafe) web.AllowUnsafeUpdates = false;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return nextValue.ToString();
        }
    }
}

The Sharepoint Site, List and Field are hardcoded in the example above, of course these should be moved to a configuration file.
We will need to install this assembly into the Global Assembly Cache (GAC) on the Sharepoint server, so it will need to be signed with a strong name. Edit the project properties and goto the Signing tab, check the “Sign the assembly” box and create a new strong name key file.

Build the project and copy the resulting dll file to into the c:\windows\assemblies folder on the Sharepoint server using windows explorer, this will install the assembly into the GAC. If you’re not working directly on the server you will not be able to copy the dll directly into the assemblies folder remotely, so copy it to a shared folder on the server first.
Make a note of the public key given to the dll file as it will be needed. The easiest way to do this is to right click the assembly in the c:\windows\assemblies folder and examine its properties, you can then copy the public key into the clipboard.
Next we need to install the web service onto the Sharepoint server alongside the existing built-in services. Copy the SequentialNumber.asmx file into the following folder on the Sharepoint server:

c:\program files\common files\microsoft shared\web server extensions\12\isapi

We need to add Disco and WSDL files to the same folder so the webservice can be discovered, this is where things get interesting… The built-in Sharepoint web services are available in all the sites for the Sharepoint web, the discovery files in the isapi folder are built on the fly for each Sharepoint site. This means they are not your standard Disco or WSDL files, but contain ASP markup to provide the virtualization functionality that is required to allow them to work with all the Sharepoint sites. If you deploy your web service to an IIS Server you can then download copies of the Disco and WSDL files which will need modifying before being saved to the Sharepoint folder.


<%@ Page="" Language="C#" Inherits="System.Web.UI.Page"%>
  <%@ Assembly="" Name="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Import="" Namespace="Microsoft.SharePoint.Utilities" %>
      <%@ Import="" Namespace="Microsoft.SharePoint" %>
        <% Response.ContentType = "text/xml"; %>
        <discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/disco/">
          <contractRef ref=""
          <% SPHttpUtility.AddQuote(SPHttpUtility.HtmlEncode(SPWeb.OriginalBaseUrl(Request) + "?wsdl"),Response.Output=""); %> docRef=<% SPHttpUtility.AddQuote(SPHttpUtility.HtmlEncode(SPWeb.OriginalBaseUrl(Request)),Response.Output); %> xmlns="http://schemas.xmlsoap.org/disco/scl/" />
          <soap address=""
          <% SPHttpUtility.AddQuote(SPHttpUtility.HtmlEncode(SPWeb.OriginalBaseUrl(Request)),Response.Output); %> xmlns:q1="http://tempuri.org" binding="q1:SequentialNumberSoap" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
          <soap address=""
          <% SPHttpUtility.AddQuote(SPHttpUtility.HtmlEncode(SPWeb.OriginalBaseUrl(Request)),Response.Output); %> xmlns:q2="http://tempuri.org" binding="q2:SequntialNumberSoap12" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
        </discovery>

Replace the namespaces, public key token with your settings.

Next create another new file called sequentialnumberwsdl.aspx and add the following code to it, again use the standard WSDL file as base:


<%@ Page="" Language="C#" Inherits="System.Web.UI.Page"%>
  <%@ Assembly="" Name="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Import="" Namespace="Microsoft.SharePoint.Utilities" %>
      <%@ Import="" Namespace="Microsoft.SharePoint" %>
        <% Response.ContentType = "text/xml"; %>
        <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://ianchivers.com/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://ianchivers.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
          <wsdl:types>
            <s:schema elementFormDefault="qualified" targetNamespace="http://ianchivers.com/">
              <s:element name="NextValue">
                <s:complexType>
                  <s:sequence>
                    <s:element minOccurs="0" maxOccurs="1" name="SPSiteUrl" type="s:string" />
                    <s:element minOccurs="0" maxOccurs="1" name="SPWebUrl" type="s:string" />
                    <s:element minOccurs="0" maxOccurs="1" name="ListName" type="s:string" />
                    <s:element minOccurs="0" maxOccurs="1" name="Title" type="s:string" />
                  </s:sequence>
                </s:complexType>
              </s:element>
              <s:element name="NextValueResponse">
                <s:complexType>
                  <s:sequence>
                    <s:element minOccurs="0" maxOccurs="1" name="NextValueResult" type="s:string" />
                  </s:sequence>
                </s:complexType>
              </s:element>
            </s:schema>
          </wsdl:types>
          <wsdl:message name="NextValueSoapIn">
            <wsdl:part name="parameters" element="tns:NextValue" />
          </wsdl:message>
          <wsdl:message name="NextValueSoapOut">
            <wsdl:part name="parameters" element="tns:NextValueResponse" />
          </wsdl:message>
          <wsdl:portType name="SequentialNumberSoap">
            <wsdl:operation name="NextValue">
              <wsdl:input message="tns:NextValueSoapIn" />
              <wsdl:output message="tns:NextValueSoapOut" />
            </wsdl:operation>
          </wsdl:portType>
          <wsdl:binding name="SequentialNumberSoap" type="tns:SequentialNumberSoap">
            <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
            <wsdl:operation name="NextValue">
              <soap:operation soapAction="http://ianchivers.com/NextValue" style="document" />
              <wsdl:input>
                <soap:body use="literal" />
              </wsdl:input>
              <wsdl:output>
                <soap:body use="literal" />
              </wsdl:output>
            </wsdl:operation>
          </wsdl:binding>
          <wsdl:binding name="SequentialNumberSoap12" type="tns:SequentialNumberSoap">
            <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
            <wsdl:operation name="NextValue">
              <soap12:operation soapAction="http://ianchivers.com/NextValue" style="document" />
              <wsdl:input>
                <soap12:body use="literal" />
              </wsdl:input>
              <wsdl:output>
                <soap12:body use="literal" />
              </wsdl:output>
            </wsdl:operation>
          </wsdl:binding>
          <wsdl:service name="SequentialNumber">
            <wsdl:port name="SequentialNumberSoap" binding="tns:SequentialNumberSoap">
              <soap:address location=""
              <% SPHttpUtility.AddQuote(SPHttpUtility.HtmlEncode(SPWeb.OriginalBaseUrl(Request)),Response.Output); %> />
            </wsdl:port>
            <wsdl:port name="SequentialNumberSoap12" binding="tns:SequentialNumberSoap12">
              <soap12:address location=""
              <% SPHttpUtility.AddQuote(SPHttpUtility.HtmlEncode(SPWeb.OriginalBaseUrl(Request)),Response.Output); %> />
            </wsdl:port>
          </wsdl:service>
        </wsdl:definitions>

The last thing we need todo is to edit the spdisco.aspx file which describes all the available Sharepoint web services, so that it also includes our Sequential Numbering service.


<discovery>
  <contractRef ref=""
  <% SPHttpUtility.AddQuote(SPHttpUtility.HtmlEncode(spWeb.Url + "/_vti_bin/SequentialNumber.asmx?wsdl"), Response.Output); %> docRef=<% SPHttpUtility.AddQuote(SPHttpUtility.HtmlEncode(spWeb.Url + "/_vti_bin/SequentialNumber.asmx"), Response.Output); %> xmlns="http://schemas.xmlsoap.org/disco/scl/" /><soap address=""
  <% SPHttpUtility.AddQuote(SPHttpUtility.HtmlEncode(spWeb.Url + "/_vti_bin/SequentialNumber.asmx"), Response.Output); %> xmlns:q1="http://schemas.microsoft.com/sharepoint/soap/directory/" binding="q1:SequentialNumberSoap" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
</discovery>

Finally restart IIS, then check that the service has is available by checking the following URL http://server/_vti_bin/sequentialnumber.asmx.

Now that the web service is installed we need to create a Sharepoint List that will store all the numbers. In the code example above the Site (SPSiteURL), List name (Number Configuration) and Field (NextValue) are all hardcoded. The Title column of the list should be a string that matches what will be passed into the web service, the NextValue field should be an integer column.
Put it all together and you should have a really next solution to sequential numbering in Sharepoint !

Office Sharepoint Designer 2007 Custom Action

This article describes how to create a custom action that will appear in the Workflow dialog in the Office Sharepoint Designer 2007 client. The example in the walkthrough is created using C#.

Create a new Visual Studio project based on the Workflow Activity Library project template. If you have Visual Studio 2008 this template will be available by default, if you’re using Visual Studio 2005 then you’ll need to install the Extensions for the .NET Framework 3.0 (Windows Workflow Foundation) available here.

If you need to use the backend Sharepoint classes then you will need to add a reference to the following files from the Sharepoint server. If your not working directly on the server take a local copy of them:

c:\program files\common files\microsoft shared\web server extensions\12\isapi\microsoft.sharepoint.dll

c:\program files\common files\microsoft shared\web server extensions\12\isapi\microsoft.sharepoint.workflowactions.dll

Edit the code behind the Activity1.cs.

Add the following using statements to include the Sharepoint classes from the files we referenced.


using Microsoft.SharePoint.WorkflowActions;
using Microsoft.SharePoint;

Here’s the main body of the code behind in Activity1.cs


public partial class Activity1 : SequenceActivity
{
public Activity1()
{
InitializeComponent();
}

/// <summary>
/// User data from the sharepoint desginer workflow.
/// </summary>
public static DependencyProperty ItemProperty = DependencyProperty.Register("Item", typeof(string), typeof(Activity1));
/// <summary>
/// The workflow context object.
/// </summary>
public static DependencyProperty __ContextProperty = DependencyProperty.Register("__Context", typeof(WorkflowContext), typeof(Activity1));
/// <summary>
/// The name of the SPList the workflow is executing on.
/// </summary>
public static DependencyProperty __ListIdProperty = DependencyProperty.Register("__ListId", typeof(string), typeof(Activity1));
//
/// <summary>
/// The integer value of the list item in the list that the workflow is running on.
/// </summary>
public static DependencyProperty __ListItemProperty = DependencyProperty.Register("__ListItem", typeof(int), typeof(Activity1));

/// <summary>
/// User data from the Sharepoint Designer workflow.
/// </summary>
[ValidationOption(ValidationOption.Required)]
public string Item
{
get
{
return ((string)(base.GetValue(Activity1.ItemProperty)));
}
set
{
base.SetValue(Activity1.ItemProperty, value);
}
}

/// <summary>
/// The workflow context object.
/// </summary>
[ValidationOption(ValidationOption.Required)]
public WorkflowContext __Context
{

get
{
return ((WorkflowContext)(base.GetValue(Activity1.__ContextProperty)));
}
set
{
base.SetValue(Activity1.__ContextProperty, value);
}
}

/// <summary>
/// The name of the SPList the workflow is executing on.
/// </summary>
[ValidationOption(ValidationOption.Required)]
public int __ListItem
{
get
{
return ((int)(base.GetValue(Activity1.__ListItemProperty)));
}
set
{
base.SetValue(Activity1.__ListItemProperty, value);
}

}

/// <summary>
/// The integer value of the list item in the list that the workflow is running on.
/// </summary>
[ValidationOption(ValidationOption.Required)]
public string __ListId
{
get
{
return ((string)(base.GetValue(Activity1.__ListIdProperty)));
}
set
{
base.SetValue(Activity1.__ListIdProperty, value);
}

}

/// <summary>
/// The Execute method contains the code that runs
/// </summary>
/// <param name="executionContext">ActivityExecutionContext object</param>
/// <returns>ActivityExecutionStatus enumerator</returns>
protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext)
{
try
{
// Get the list in which this workflow was started.
SPList list = __Context.Web.Lists[new Guid(__ListId)];

// Get the item that has triggered the workflow.
SPListItem item = list.Items.GetItemById(__ListItem);

//Write your code here
}
catch (Exception ex)
{
//Create an application event log source to log any errors to.
if (!System.Diagnostics.EventLog.SourceExists("ActivityLibrary")) System.Diagnostics.EventLog.CreateEventSource("ActivityLibrary", "Application");
EventLog.WriteEntry("ActivityLibrary", ex.Message, EventLogEntryType.Error);
}
//Set the ActivityExecutionStatus to Closed to complete the acitvity.
return ActivityExecutionStatus.Closed;
}
}

If you want to write to the Event Log on the server you will need to grant permission in the registry to the account that is running the sharepoint application pool. Edit the permissions of the following registry key and grant the NETWORK SERVICE account Full Control:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application

We will need to install this assembly into the Global Assembly Cache (GAC) on the Sharepoint server, so it will need to be signed with a strong name. Edit the project properties and goto the Signing tab, check the “Sign the assembly” box and create a new strong name key file.

Build the project and copy the resulting dll file to into the c:\windows\assemblies folder on the Sharepoint server using windows explorer, this will install the assembly into the GAC. If your not working directly on the server you will not be able to copy the dll directly into the assemblies folder remotely, so copy it to a shared folder on the server first.

Make a note of the public key given to the dll file as it will be needed. The easiest way to do this is to right click the assembly in the c:\windows\assemblies folder and examine its properties, you can then copy the public key into the clipboard.

Copy the XML Document below and save it to following file location on the Sharepoint server:

C:\program files\common files\microsoft shared\web server extentions\12\template\1033\workflow\workflowactivitylibrary.actions


<?xml version="1.0" encoding="utf-8"?>
<WorkflowInfo>
<Actions Sequential="then" Parallel="and">
<Action Name="The name of the Action"
ClassName="WorkflowActivityLibrary.Activity1"
Assembly="WorkflowActivityLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8a547c1061ba62ad"
AppliesTo="list"
Category="Custom Actions"
UsesCurrentItem="true">
<RuleDesigner Sentence="Perform custom action with this text %1">
<FieldBind Field="Item" Text="message" DesignerType="TextArea" Id="1"/>
</RuleDesigner>
<Parameters>
<Parameter Name="__Context" Type="Microsoft.SharePoint.WorkflowActions.WorkflowContext, Microsoft.SharePoint.WorkflowActions" Direction="In" />
<Parameter Name="__ListId" Type="System.String, mscorlib" Direction="In" />
<Parameter Name="__ListItem" Type="System.Int32, mscorlib" Direction="In" />
</Parameters>
</Action>
</Actions>
</WorkflowInfo>

You can create Rules to collect information from the user creating the workflow in the Sharepoint Designer client. Here’s a link to the Workflow Actions Schema documentation on MSDN.

Finally we need to let Sharepoint know that our assembly is safe to use by editing the web.config file in the c:\inetput\wwwroot\wss\virtualdirectories\80 folder on the Sharepoint server.

Add the following snippet into the web.config file:


<configuration>
<System.Workflow.ComponentModel.WorkflowCompiler>
<authorizedTypes>
<authorizedType Assembly="WorkflowActivityLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8a547c1061ba62ad" Namespace="ActivityLibrary" TypeName="*" Authorized="True" />
</authorizedTypes>
</System.Workflow.ComponentModel.WorkflowCompiler>
</configuration>

Now restart IIS on the Sharepoint server, and create or edit an existing workflow in the Sharepoint Designer client. You should now see your custom action ! If you need to make changes to the code, you only need to recompile and update the assembly in the GAC on the Sharepoint server.

Welcome

Welcome to my blog !

This blog has been setup using free webspace from www.110Mb.com and a mySQL server from www.free-mysql.bizhost.com  I’ve also setup an e107 website at www.ianchivers.com and a phpBB forum at http://forums.ianchivers.com

« Previous Page