---
schema_version: "1"
id: 8bf3d8419127f40059c376b965ce10b8626f55e9d4bf4b6efd3d89a046d80820
title: Set Errors In an Omniscript (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_set_errors_in_an_omniscript.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_set_errors_in_an_omniscript.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: cd8bd4f8c74a686e8c4d96f55fee487f9b9e69b2a7da6338d856e8b3e4b2d6e3
description: For the managed package runtime, put error or validation messaging on one or more elements in a previous step based on conditions from future steps using the Set Errors action element. Using required fields and Formula/Messaging elements, you can set requirements and conditions on elements only in the current step.
products:
  - Omnistudio
release: "264"
---
# Set Errors In an Omniscript (Managed Package)

For the managed package runtime, put error or validation messaging on one or more elements in a previous step based on conditions from future steps using the Set Errors action element. Using required fields and Formula/Messaging elements, you can set requirements and conditions on elements only in the current step.

![Managed Package app icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/resources-global/_corporate/images/managedpackageicon.png) This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see [Omnistudio Help](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_standard.htm&language=en_US).

For example, on an application, an email address may not be required during the initial intake step, and in a future step, the user states that they wish to be contacted by email. The Set Errors element runs after the step and returns the user to the initial intake step with custom error messages.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/images/icon_note.png)

Note

The Set Errors action doesn’t support File, Image, Messaging, and Formula elements and doesn’t support custom labels.

The name of a Set Errors element must be unique within an Omniscript and all the reusable Omniscripts it uses.

1. In Omniscript, drag the Set Errors element into the canvas.
2. Add a conditional to control when the Set Errors message displays. Without a conditional the error will persist in the Omniscript. See [Use the Conditional View Property to Conditionally Display Elements (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_conditionally_display_elements_using_the_conditional_view_property.htm&release=264.0.0&type=5 "For the managed package runtime, every step, block, or element supports at least one Conditional View. Conditional Views allow you to hide the element or the group of elements contained in a block or step based on certain conditions. Elements contain up to three conditional view options depending on the type of element. For example, an Action outside of a Step doesn’t have a Read-Only option since the action isn’t visible.").
3. In the **Element Name** field, enter the name of your element.
4. In the **Value** field, enter the error message that displays to the user.