I have a situation that shouldn’t be too uncommon.
User A links entities X and Y. Entity Y’s fields are effectively an extension of X and wholly reliant on X for formulas. Once Y has been assigned to X, it should never be removed unless either entity is deleted.
User B comes along and links Y to Z. This not only removes Y from X in this many-to-one relationship, but it breaks the data in a way that’s hard to catch.
I need a way of locking down this field so that users can only create and link, not link existing entities or reassign.
Hey! I feel you. I wish you could specify the behaviour per relation view (compact view as well as the larger relation views)
For the time being, I’m assuming this is a to-many relation, this behavior (in the larger relation views) is only for the list view. So what i find myself doing a lot in these scenarios is to make a board view and set the size to “line” this basically makes it a list view, without the ablility to link, or even unlink! only create and delete.
While annoying you can’t set this per view, you are given the ability to choose this behaviour based on which view you choose.
More about linking and unlinking? Choose list, more about creating or deleting? Choose any of the others.
Not a real solution, but you could create a Rule that triggers on the unlink, and generates some sort of warning/notification (though not as a toast/pop-up when the change actually is made).
A workaround: I sometimes use (and should use more often) a formula column. Say I’m linking something to a project. In the create Form, I’ll use the relation field, Project Link to choose the project. Then, in views, etc. I’ll use the formula field Project (formula being [Project Link]) which shows the project relation as a read-only field.
Obviously, this means doubling up on fields, which isn’t ideal, but works. It does assume that team members aren’t going to make their own views and add Project Link instead of Project though.
I do the same for State fields if they’re updating based on other things, or only via button, etc.
you can’t set the sort (or the order of displayed fields) in an “entity link” generated by a formula, because there is no toolbar (and the filter is not drag-and-drop)
Imagine customers who sign legal documents, or “contracts”. These are uploaded on a new entity, with a description which has a summary of the document, a link to the customer that signed, and a date.
Now say a user goes into another customer and approaches from the “contracts” list view. They click on the link button, then choose an existing contract. Immediately, that contract’s previous link is severed. Now two unrelated entities are joined.
The ability to link or unlink should be limited - either by user/group permissions, globally, entity type, per relationship, or a combination of - to prevent data issues like this occurring.
In this case, I’d prefer if the “contract” could never be disassociated from the customer, and only “new” contracts were allowed. This obviously should be overridable by the system administrator.
Have you considered using a relation filter so that Contracts linked to an existing Customer are excluded from the list of entities that can be chosen to be linked?