Unlinking and replacing a link
End a link, or move it to another record in one step.
Unlink
The record view's Relations tab lists the record's current links in both directions, each named from this record's side, with the record at the other end. Unlink asks first. It ends the link today: the link leaves every column, path and highlight, both records stay as they are, and the ended link is kept as history with who ended it. A link to a deleted record is not listed, as the record is hidden.
When an unlink would be refused — it would leave a record below its minimum number of links of that kind, or the tenant or the link is under a legal hold — the Relations tab says why beside the link instead of offering Unlink; a hold does the same for Replace. Where a record must keep exactly one link of a kind, Replace is offered and the sentence points to it. The server refuses these writes as well.
Replace
Replace moves a link to another record in one step: this record keeps the link, and the record at its other end is replaced by one you choose from the records the relation accepts there (the first 100 are offered, with a search). It is how a link is moved when a record must have exactly one link of a kind (minimum and maximum both 1), where linking a second one is refused by the maximum and unlinking the first by the minimum. The rules are checked on the result: the record the link leaves must keep its minimum, the one you choose must stay within its maximum, and the two must not already be linked when one link per pair is allowed. The old link ends today and is kept as history with who replaced it; the new one holds from today. Values the old link carried, such as a role, stay with the old link.
Keep in mind A replace is two writes (end the old link, save the new one), and the system saves them one after the other. If the second write fails, the first is undone and the link is as it was; the message says so. In the rare case that the undo fails too, the message says what is left and what to do.
