Loading

Process Builder Validation Error: "Object Referenced in Square Brackets Must Be" When Editing a Process Formula (Winter '18 and Later)

Дата публикации: May 14, 2026
Описание

Starting with the Winter '18 release, Salesforce added validation to Process Builder to ensure that object names referenced in formula syntax use the correct case. In Process Builder, field references in formula syntax must begin with the name of the object the process is built on, enclosed in square brackets (e.g., [Case].CreatedDate for a Process on the Case object).
Prior to Winter '18, this validation did not exist. As a result, existing Processes may contain formulas with incorrect object name casing (e.g., [case].CreatedDate instead of [Case].CreatedDate). When attempting to save or clone such a Process in Winter '18 or later, the following error appears:

"The object referenced in the square brackets must be [Object Name]"

Решение

Option 1: Fix Directly in Process Builder (Single Element)

If the incorrect object reference appears in only one element of a draft Process, the fix can be made directly in Process Builder:

  1. Open the affected Process in Process Builder.
  2. Locate the formula element containing the incorrect object reference.
  3. Correct the object name in the formula to match the exact casing of the object the Process is built on (e.g., change [case] to [Case]).
  4. Save the Process.

Option 2: Fix via Metadata API and Workbench (Multiple Elements or Active Process)

If the incorrect object references appear in multiple elements, or if the Process is or was previously active, the error cannot be corrected in the Process Builder UI. The Process must be retrieved via the Metadata API, edited in the .flow file, and redeployed as a new version.
Important Note: Manipulating metadata is beyond the scope of Salesforce Support. Use caution when following these steps.
Steps using Workbench:

  1. Create a text file named package.xml with the following content, replacing the members value with your Process name and version number:
    1. Set <members> to the name and version of the Process (e.g., My_Process-4 for version 4 of a process named "My_Process")
    2. Set <version> to 40.0 or the appropriate API version
  2. Log in to your org using Workbench and click Migration > Retrieve.
  3. Under "Unpackaged Manifest," upload your package.xml file, check the Single Package checkbox, and click Next.
  4. Download and unzip the returned .zip file. It contains a package.xml file and a flows/ folder with the Process .flow file.
  5. Edit the .flow file:
    1. Rename the .flow file and increment the version number by 1 (e.g., if the latest version is 6, rename to My_Process-7.flow)
    2. Search for any square-bracket object references that do not match the exact casing of the object the Process is built on, and replace them with the correct casing
    3. Update the <members> value in package.xml to match the renamed .flow filename
  6. Re-zip the edited files, preserving the same folder structure.
  7. In Workbench, click Migration > Deploy, select the .zip file, check Rollback On Error and Single Package, then click Next > Deploy.
  8. In Process Builder, confirm the new version of the Process was created. Open the Process and click Save in any element to confirm the error no longer appears.
Номер статьи базы знаний

000383560

 
Загрузка
Salesforce Help | Article