Unique indexes

Create unique indexes to combine two fields from an object into a single, indexed value that must remain unique within the object. When you create a unique index, you establish a rule that no two values within the object can have this same combination of values. Establishing a unique index is useful for something like a sales leads object, where you want to eliminate duplicate entries. Although some leads might have the same name, and some corporate buyers might share the same phone number, having both values in common indicates a duplicate record. You can set a unique index of name and phone number so that you ensure this combination of values is always unique.

Unique indexes can be used with custom objects only.

Add a unique index

Whenever you have a group of values in a record that need to be unique as a combined set, you can define a unique index. For example, in a location object, you might combine address, city, and state or territory fields into a unique index. Combining the fields for a unique index ensures that locations remain unique.

To add a unique index:

  1. Go to Platform Services > All > Objects.

  2. Find and select the appropriate object.

    Use the Filter by application dropdown list at the top of the page to filter by custom applications.

  3. On the Object Definition page, select Unique indexes at the top, then select New unique index.
  4. Enter an Index name.
  5. Enter an Error message to display any time a user enters a duplicate value into a field included in the unique index.
  6. Select fields in the Available fields column and move them into the Selected fields column using the arrow buttons. These fields are included in your unique index.
  7. Select Save.

Edit a unique index

You might want to add or remove fields from a unique index, depending on how your business has changed.

To edit a unique index:

  1. Go to Platform Services > All > Objects.

  2. Find and select the appropriate object.

    Use the Filter by application dropdown list at the top of the page to filter by custom applications.

  3. On the Object Definition page, select Unique indexes at the top, then select Edit next to the appropriate unique index.
  4. Make changes as needed. See Add a unique index for more details about your options.
  5. Select Save.

View a list of unique indexes

  1. Go to Platform Services > All > Objects.

  2. Find and select the appropriate object.

    Use the Filter by application dropdown list at the top of the page to filter by custom applications.

  3. On the Object Definition page, select Unique indexes at the top.

Delete a unique index

You can delete a unique index if it is no longer user, but be careful. After you delete a unique index, it cannot be restored.

To delete a unique index:

  1. Go to Platform Services > All > Objects.

  2. Find and select the appropriate object.

    Use the Filter by application dropdown list at the top of the page to filter by custom applications.

  3. On the Object Definition page, select Unique indexes at the top.
  4. Select the Del link next to the appropriate unique index.
  5. On the confirmation dialog box, select Yes, then select Delete.