> ## Documentation Index
> Fetch the complete documentation index at: https://superofficeas-bugfix-ty-screen-designer-paradox.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# NSWorkflowGoal

> Carrier object for WorkflowGoal.

Carrier object for WorkflowGoal.

## Constructors

### NSWorkflowGoal()

```crmscript theme={null}
NSWorkflowGoal
```

Initializes a new instance of the NSWorkflowGoal class.

## Methods

## GetWorkflowGoalId()

Gets the primary key (ID) for the WorkflowGoal.

```crmscript theme={null}
Integer GetWorkflowGoalId()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - WorkflowGoal Id.

## SetWorkflowGoalId(Integer)

Sets the primary key (ID) for the WorkflowGoal.

```crmscript theme={null}
Void SetWorkflowGoalId(Integer workflowGoalId)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

## GetWorkflowId()

Gets the ID of the flow this goal belongs to.

```crmscript theme={null}
Integer GetWorkflowId()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Workflow ID.

## SetWorkflowId(Integer)

Sets the ID of the flow this goal belongs to.

```crmscript theme={null}
Void SetWorkflowId(Integer workflowId)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

## GetGoalType()

Gets the workflow goal type.

```crmscript theme={null}
NSWorkflowGoalType GetGoalType()
```

**Returns:** [CRMScript.NetServer.NSWorkflowGoalType](CRMScript.NetServer.NSWorkflowGoalType) - Goal type.

## SetGoalType(NSWorkflowGoalType)

Sets the workflow goal type.

```crmscript theme={null}
Void SetGoalType(NSWorkflowGoalType goalType)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

## GetRestrictionGroups()

Gets the restrictions (can be multiple groups) that make up the Workflow goal criteria.

```crmscript theme={null}
NSArchiveRestrictionGroup[] GetRestrictionGroups()
```

**Returns:** [CRMScript.NetServer.NSArchiveRestrictionGroup](CRMScript.NetServer.NSArchiveRestrictionGroup)\[] - Array of restriction groups.

## SetRestrictionGroups(NSArchiveRestrictionGroup\[])

Sets the restrictions that make up the Workflow goal criteria.

```crmscript theme={null}
Void SetRestrictionGroups(NSArchiveRestrictionGroup[] restrictionGroups)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)
