> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CreateError

> Configure the CreateError Pega activity for a single-document case: open the case by handle and post the supplied error message using Page-Set-Messages.

For more information about creating an activity, see [Creating a Pega activity](/flexi-capture/connectors/pega/pega-activity-create).

## Pages & Classes

| **Page name** | **Class** |
| ------------- | --------- |
| Case          | Work-     |

## Parameters

| **Name**     | **Data type** | **Required** |
| ------------ | ------------- | ------------ |
| CaseId       | String        | Yes          |
| errorMessage | String        | Yes          |

## Steps

Step 1:

**Method**: Obj-Open-By-Handle.

**Step page**: Case.

**InstanceHandle**: Param.caseId.

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega125.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=95a0242ae3307fca188b0e251b4eb165" alt="Screenshot of the CreateError activity in Pega, showing Step 1 with the Obj-Open-By-Handle method on the Case step page and InstanceHandle set to Param.caseId." width="870" height="249" data-path="images/flexi-capture/connectors/Pega125.png" />
</Frame>

Step 2:

**Method**: Page-Set-Messages.

**Message**: Param.errorMessage.

<Frame>
  <img src="https://mintcdn.com/abbyy/KEmWsO92hkr7eybZ/images/flexi-capture/connectors/Pega126.png?fit=max&auto=format&n=KEmWsO92hkr7eybZ&q=85&s=b007e87eb4945eba9113a7a142fba012" alt="Screenshot of the CreateError activity in Pega, showing Step 2 with the Page-Set-Messages method and the Message parameter set to Param.errorMessage." width="895" height="195" data-path="images/flexi-capture/connectors/Pega126.png" />
</Frame>
