Enforcing Unique Values in Custom Object Fields
About Unique Fields for Custom Objects
The unique field feature lets you prevent duplicate data in your CRM. When you mark a custom object field as unique, the system ensures no two records can share the same value for that field. This is essential for maintaining clean data, especially for critical identifiers like invoice numbers, membership IDs, or serial numbers.
Key Benefits
- Prevent Duplicates: Block the creation or update of records with duplicate values across all methods, including manual entry, forms, workflows, and API calls.
- Ensure Data Accuracy: Guarantee reliable reporting and automation by maintaining one-to-one relationships for key data points.
- Safeguard Data Operations: Protect against accidental duplication during bulk imports or automated actions with built-in validation.
Rules and Limitations
- You can mark a maximum of 10 fields as unique across all your custom objects.
- Uniqueness is enforced across the entire sub-account.
- You can mark the following field types as unique: Single Line Text, Multi Line Text, Number, and Phone.
- You can mark a field as unique only when creating it. Once you save a field as non-unique, you cannot later change it back to unique.
How to Mark a Field as Unique
When Creating a New Custom Field
- Go to Settings and select Custom Fields.
- Click + Add Field.
- Choose a supported field type (Single Line, Multi Line, Number, or Phone).
- Enter the field name and assign it to an object and group.
- Check the box for Mark Field as Unique.
- Click Save.
When Creating a New Custom Object
You can also enforce uniqueness for the object's primary display field during setup.
- Navigate to Settings > Objects.
- Click + Add Custom Object.
- Define the Custom Object Name and Primary Display Field.
- Check the box for Mark Primary Field as Unique.
- Click Create Custom Object.
Modifying or Removing Uniqueness
You can remove the unique constraint from a field, but this action is permanent.
- Go to Settings > Custom Fields.
- Find and select the unique field you wish to modify.
- Click on Bulk Actions and choose Edit.
- Deselect the Mark Field as Unique option.
- Save your changes. Remember, you cannot re-enable uniqueness for this field later.
Example Scenarios
- Duplicate Primary Field: If a user tries to save a record where the unique primary field (like 'Case Number') matches an existing record, they will see an error: “A record with the same value already exists.”
- Duplicate Non-Primary Unique Field: During an import, if rows contain duplicate values for a unique field, the import may complete but will skip those duplicate rows and log a warning.
- API Call with Duplicate: An API request to create or update a record with a duplicate unique field value will return a validation error.
Best Practices
- Reserve unique fields for stable identifiers like order numbers, license keys, or employee IDs.
- Avoid marking fields that contain frequently changing or subjective text (like 'Notes') as unique.
- Clean and deduplicate your data in a spreadsheet before importing it to prevent warnings and failed rows.
- Plan for uniqueness from the start, as you cannot add it to an existing field later.
Frequently Asked Questions
Where is the uniqueness check applied?
It is enforced globally across your sub-account for all methods of creating or updating records: the main interface, workflows, forms, and API.
What happens if I try to save a duplicate?
You will receive an error message stating that a record with the same value for that field already exists.
Can I mark an Email or Dropdown field as unique?
Not at this time. Currently, only Single Line Text, Multi Line Text, Number, and Phone field types support the unique setting.
What happens during a CSV import with duplicates?
The import process will finish, but any rows containing a value for a unique field that already exists in the system will fail to import.
Does this feature slow down API operations?
No. The validation is handled efficiently, so there is no noticeable performance impact, even for large batches of records.
Is uniqueness enforced across my entire agency account?
No. The unique constraint applies only within a single sub-account. Two different sub-accounts can have records with the same value in a field marked as unique.