SourCherry Help Centre
Home โ€บ Custom Objects. โ€บ Managing Custom Object Records

Custom Objects - Unique Fields Support



The Unique Fields feature allows you to ensure that specific field values remain unique across all records within a Custom Object. This helps maintain data integrity, prevent duplication, and ensure that identifiers such as IDs or reference numbers are never reused accidentally. This article shows how to use unique fields in custom objects.


TABLE OF CONTENTS


What is Unique Fields for Custom Objects?


Unique Fields is a data-integrity setting that you can enable on selected custom-object fields. When a field is flagged as unique, SourCherry checks every new or updated record and blocks any value that already exists anywhere in the sub-account. This ensures every custom-object record stays truly unique and eliminates messy deduplication projects down the road. 


Key Benefits of Unique Fields



Rules, Limits & Field Support



How to Mark a Field as Unique in Custom Objects


Note: Once saved, this setting applies across all records within the subaccount and cannot be re-enabled once turned off.


Option 1: While Creating a New Custom Field


  1. Navigate to Settings.



  2. Click on Custom Fields.

  3. Click + Add Field.



  4. Select a supported field type (Single Line, Multi Line, Number, or Phone).

  5. Enter the field name, object, and group.

  6. Check the box for Mark Field as Unique.

  7. Click Save.



Option 2: Marking a Primary Field as Unique While Creating Custom Object


  1. Go to Settings.



  2. Click on Objects.

  3. Click on + Add Custom Object.



  4. Define the Custom Object Name and Primary Display Field.

  5. Check Mark Primary Field as Unique.

  6. Click Create Custom Object.

  7. This ensures the primary field (for example, Case No. or VIN Number) cannot have duplicates.


How to Modify Unique Fields  


Note: Once downgraded from unique to non-unique, it cannot be made unique again.


  1. Go to Settings > Custom Fields.

  2. Find or Search the Unique Custom Field.

  3. Select the Field.

  4. Click on Bulk Actions > Edit.

  5. Deselect Mark Field as Unique option.



Example Scenarios


ScenarioActionResult
Two records have the same value in a Primary fieldUser savesError: โ€œA record with the same value already exists.โ€
Two records with the same value in a non-primary unique fieldUser savesPartial success โ€“ duplicate rows skipped with warnings
Field marked as unique, then user attempts deletionDeleteWarning โ€“ field cannot be deleted
Unique field downgraded to non-uniqueUser savesAllowed, but irreversible
API used to update with duplicate valueUpdate callAPI returns validation error

Best Practices



Frequently Asked Questions


Q: Does uniqueness apply account-wide?

Yes. Uniqueness is enforced globally across the sub-account.


Q: Is the check applied on updates as well as creates?

Yes. Create and update actions are both blocked if the unique value already exists.


Q: What error do users see on a duplicate?

Youโ€™ll see a message like: โ€œA record with the same value for <fieldName> already exists.โ€


Q: Where is uniqueness enforced?

Across all entry points: manual record creation, workflows/automations, and forms.


Q: Can I mark a dropdown or email field as unique?

Only Single Line, Multi Line, Number, and Phone fields are supported in this release.


Q: What happens during a CSV import if duplicates exist?

The import finishes, but rows with duplicate unique-field values fail. 


Q: Do uniqueness checks slow down API bulk inserts?

No. The validation is optimized at the database layer, so performance impact is negligible even for large batches.


Q: Can two sub-accounts have the same value in a unique field?

Yes. Uniqueness is enforced per sub-account, not across the entire agency.