Sample Duet Enterprise XML Snippet: Code Action

This XML snippet shows how to create a code method action that is part of a Duet Enterprise solution.

Applies to: Duet Enterprise for Microsoft SharePoint and SAP Server 2.0 | Office 2010 | SharePoint Server 2010

You can use code method actions to execute code and enable advanced scenarios by using the Microsoft Business Connectivity Services (BCS) object model. You can pass parameters to both URL actions and code method actions. A parameter can be either a constant parameter or an expression parameter. A constant parameter is a constant value that is passed to the action during run time. An expression parameter refers to a field in the external data type.

Example Code Method Action

The following XML snippet is an example of the XML to use to create a code method action.

<?xml version="1.0" encoding="utf-8" ?> 
<Action xmlns="http://schemas/oba/2010/Action" Name="Greetings" Version="1.0.0.0">
<CodeMethodAction  MethodType="Custom"
  Name="SayGreetings"
  QualifiedTypeName="Greetings.Greetings, $AssemblyName$,
  Version=14.0.0.0, Culture=neutral, 
  PublicKeyToken=$PublicKeyToken$"
  MethodName="SayGreetings">
  <Parameters>
    <ConstantParameter Name="GreetingsString" Value="Greetings" ValueType="System.String"/>
    <ExpressionParameter Name = "FirstName" Expression="GivenName" ValueType="System.String"/>
    <ExpressionParameter Name = "LastName" Expression="FamilyName" ValueType="System.String"/>
  </Parameters>
</CodeMethodAction>
</Action>

For a complete solution, see How To: Create an Outlook Solution Using Duet Enterprise Outlook Application Designer.

See Also

Other Resources

Creating Advanced Code-Based Solutions Using Business Connectivity Services (https://msdn.microsoft.com/en-us/library/ff394635.aspx)