Share via


Fields Property

Fields Property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

The property collection for the object. This property is read-only.

Applies To

IProcessInstance Interface

Type Library

Microsoft CDO Workflow Objects for Microsoft Exchange

DLL Implemented In

CDOWF.DLL

Syntax

[Visual Basic]Property Fields As ADODB.Fields

[C++]HRESULT get_Fields(Fields** varFields);

Parameters

  • varFields
    Returned reference to the Fields collection of the object.

Remarks

There are three ways to assign properties with Microsoft ActiveX Data Objects (ADO) and Collaboration Data Objects (CDO):

  • Use the fields collection on a record object (ADO)
  • Use the fields collection on a CDO object (CDO)
  • Use the CDO property name with a CDO object (CDO)

CDO workflow does not support the second method for workflow schema properties. You can only use the second method for your own custom properties.

If you are familiar with ADO, you are used to setting properties on a record using the fields collection. For example:

Dim Rec As ADODB.Record 'Bind record object to the item on which you want to set properties 'Use the workflow schema name to set the property on the item Rec.fields("https://schemas.microsoft.com/cdo/workflow/commonscripturl") = "yourURL" CDATA.

CDO workflow supports the previous assignment type for most workflow properties. However, it does not support assigning workflow schema properties by using the Fields collection with a CDO Workflow object. The following is not supported, for example:

Dim pd As CDOWF.ProcessDefinition 'Get datasource interface on ProcessDefinition and open item 'This is not supported pd.fields("https://schemas.microsoft.com/cdo/workflow/commonscripturl") = "yourURL" CDATA.

If you have the Workflow object, as in the previous code, use the workflow property. For example:

pd.CommonScriptURL = "yourURL" CDATA.

You can use the Workflow object with the Fields collection in an assignment only for your custom properties. The following assignment is acceptable, for example:

Dim pd As CDOWF.ProcessDefinition 'Get datasource interface on ProcessDefinition and open item pd.fields("YourNameSpace://workflow/yourcustomproperty") = "yourURL" CDATA.

The previous discussion applies to all of the workflow objects that support the Fields collection.

Note  When you use the ADO Fields.Update method, field values are updated only in memory. You must call Save Method to save the changes to the Exchange store. To get the IDataSource Interface, use the GetInterface method on the CDO object.

See Also

Fields Property

Send us your feedback about the Microsoft Exchange Server 2003 SDK.

Build: June 2007 (2007.618.1)

© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.