Skip to content

A custom form built on a Custom Logical Unit lets users add new records with no check for whether a record with the same key value, like a Project Name, already exists. Is there a way to designate a specific field as effectively a business-level primary key, rejecting duplicates on that field?

Answer

Mark that specific field as an Alternate Key rather than trying to change the LU's actual primary key — with an Alternate Key defined, users are blocked from saving a new record whose value on that field duplicates an existing row's value, giving you the uniqueness enforcement you're after. Separately, note that a Custom LU's underlying table always keeps ROWKEY as its genuine database primary key internally regardless of any Alternate Key you add — that ROWKEY-based primary key should never be removed or changed at the database level, even from custom database code, when adding an Alternate Key purely for business-level uniqueness.

← Browse Developer Studio, deployment, and upgrades questions