Share via


XDocument.GetWorkflowTasks Method

InfoPath Developer Reference

Gets a reference to a WorkflowTasks collection for the current form.

Version Information
 Version Added:  InfoPath 2007

Syntax

expression.GetWorkflowTasks

expression   An expression that returns an XDocument object.

Return Value
WorkflowTasks

Remarks

The WorkFlowTasks collection is part of the Microsoft Office 12.0 Object Library.

Example

In the following example, the Count property of the WorkflowTasks collection is used to show the number of workflow tasks associated with the form.

Bb230099.vs_note(en-us,office.12).gif  Note
If at least one workflow is not associated with the form, using the GetWorkflowTasks method will generate an error.
JScript
  XDocument.UI.Alert("Number of workflow tasks: " + XDocument.GetWorkflowTasks().Count);

Remarks

Security Level 3: Can be accessed only by fully trusted forms.