Platform SDK: Exchange 2000 Server

Fields Property

[This is preliminary documentation and subject to change.]

The property collection for the object.

[Visual Basic,VBScript]
Property Fields As Fields
[C++]
HRESULT Fields([out, retval] Fields** varFields);
[IDL]
HRESULT Fields([out, retval] Fields** varFields);

Remarks

In general, you have three methods for assigning properties with Microsoft® ActiveX® Data Objects (ADO) and Collaboration Data Objects (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("http://schemas.microsoft.com/cdo/workflow/commonscripturl") = "yourURL"

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("http://schemas.microsoft.com/cdo/workflow/commonscripturl") = "yourURL"

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

pd.CommonScriptURL = "yourURL"

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

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

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

See Also

IItem.Fields

IProcessDefinition