---
id: WF-PFM-MTD-006
title: Change a custom record's owner after its save
trigger: The owner control represents a relationship rather than a property value.
product_area: platform
module: metadata
revision: 1
status: draft
design_intent: proposed
implementation_evidence: observed
inference: []
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
implements:
- CAP-PFM-MTD-012
- CAP-PFM-MTD-018
moves:
- STATE-PFM-MTD-005
- STATE-PFM-MTD-010
crosses:
- SVC-PFM-MTD-custom-objects
- SVC-PFM-MTD-associations
idempotency: No transaction or token spans content and owner calls. Repeated removal can return not found, repeated
  creation can conflict, and concurrent ownership edits are governed by individual link occupancy.
concurrency: No transaction or token spans content and owner calls. Repeated removal can return not found, repeated
  creation can conflict, and concurrent ownership edits are governed by individual link occupancy.
hops:
- n: 1
  actor_or_service: Console record editor
  action: The record editor creates the entry or patches changed properties at the version read, separately from
    ownership.
  anchor: react-console:components/console/custom-objects/record-editor.tsx
  seam: sync
  on_failure: Show field errors or the reloadable stale-version notice before owner calls.
  left_inconsistent: A rejected record save leaves previous record content.
  observer: The initiating person or service and its operation logs.
  provenance: observed
  source: react-console:components/console/custom-objects/record-editor.tsx
- n: 2
  actor_or_service: Console record editor
  action: If ownership changed, the client removes the existing owner connection first.
  anchor: react-console:lib/forms/custom-objects/owner.ts:applyOwnerChange
  seam: sync
  on_failure: Report that record content saved but ownership did not change.
  left_inconsistent: The committed record retains its former owner if removal failed.
  observer: The initiating person or service and its operation logs.
  provenance: observed
  source: react-console:lib/forms/custom-objects/owner.ts:applyOwnerChange
- n: 3
  actor_or_service: Relationship service
  action: Associations removes an undated owner link or ends an open dated one, capturing the revision and applicable
    event.
  anchor: services-platform:modules/associations/services/persistence/associations.ts:deleteAssociation
  seam: sync
  on_failure: Stop the ownership sequence and report the removal refusal.
  left_inconsistent: Saved record content remains with the old connection when removal is refused.
  observer: The initiating person or service and its operation logs.
  provenance: observed
  source: services-platform:modules/associations/services/persistence/associations.ts:deleteAssociation
- n: 4
  actor_or_service: Console record editor
  action: The client requests the replacement owner link into the saved record.
  anchor: react-console:lib/custom-objects/api.ts:createOwnerAssociation
  seam: sync
  on_failure: Explain that the record saved and the preceding owner was removed when creation fails.
  left_inconsistent: Record content is committed with no completed replacement owner.
  observer: The initiating person or service and its operation logs.
  provenance: observed
  source: react-console:components/console/custom-objects/record-editor.tsx:settleOwner
- n: 5
  actor_or_service: Relationship service
  action: Associations creates the replacement under endpoint and single-owner occupancy checks, capturing revisions
    and its created event.
  anchor: services-platform:modules/associations/services/persistence/associations.ts:createAssociation
  seam: sync
  on_failure: Refuse a conflicting or invalid connection and let the editor report the partial save.
  left_inconsistent: A previously removed owner is not restored automatically.
  observer: The initiating person or service and its operation logs.
  provenance: test
  source: services-platform:modules/associations/tests/integration/services/persistence/associations.in-force.integration.spec.js#refuses
    a second link of a one-place typ
branches:
- Without owner-change reach, the owner control remains settled and no ownership calls run.
- Creation from an owner page carries its selected owner directly to connection creation.
waits: []
evidence:
- 'react-console at baf6dae3: lib/forms/custom-objects/owner.ts, owner-field.ts; components/console/custom-objects/record-editor.tsx;
  lib/custom-objects/api.ts'
- 'services-platform at ad3f6a65: modules/associations/services/persistence/associations.ts'
controls: [TC-AVL-005, TC-AZ-001, TC-AZ-002, TC-AZ-003, TC-AZ-004, TC-DAT-001, TC-DAT-002, TC-DAT-003, TC-DAT-004, TC-IAM-001, TC-IAM-002, TC-IAM-004, TC-IAM-005, TC-LOG-002, TC-LOG-003, TC-LOG-004, TC-LOG-005, TC-MON-002, TC-PI-001, TC-PI-002, TC-PI-003, TC-PI-005, TC-PRV-001, TC-PRV-002, TC-TEN-001, TC-TEN-002, TC-TEN-003, TC-TEN-004, TC-VEN-001, TC-VEN-002, TC-VEN-003]
---

# Change a custom record's owner after its save

## What It Does

The owner control represents a relationship rather than a property value. The client saves record content, removes an earlier owner and then creates the selected owner connection.

## The Flow

```mermaid
sequenceDiagram
  participant Keeper as Record keeper
  participant UI as Record editor
  participant Store as Record store
  participant Rel as Relationship service
  Keeper->>UI: save with new owner
  UI->>Store: save record (version)
  Store-->>UI: saved
  opt had an owner
    UI->>Rel: remove old owner link
  end
  UI->>Rel: create new owner link
  alt owner step failed
    UI-->>Keeper: "saved, but its owner was not changed" (and "previous owner removed")
  else
    UI-->>Keeper: record page
  end
```

## When Something Fails

Show field errors or the reloadable stale-version notice before owner calls. A rejected record save leaves previous record content. Report that record content saved but ownership did not change. The committed record retains its former owner if removal failed. Stop the ownership sequence and report the removal refusal. Saved record content remains with the old connection when removal is refused. Explain that the record saved and the preceding owner was removed when creation fails. Record content is committed with no completed replacement owner. Refuse a conflicting or invalid connection and let the editor report the partial save. A previously removed owner is not restored automatically.

## Open Design Questions

A single record-and-owner operation would require a product and architectural decision.
