Rule - Controlling access to fields of child entity

I’ve 1:N relation between two entities I need to implement following rule. If a certain field has a certain value (for example false), it shouldn’t be possible to add or delete rows in child entity. How can I achieve it?

In order to control the read only status on a child entity depending on parent’s record field values you need to:

  • Provide your field from the parent entity to the child entity by either a lookup field or using a data structure by adding an extra field linked from the parent entity
  • Create a Row Level Security Rule on the child entity (or its field) that will take the parent entity field as a condition
  • Set Deny Create to the rule
  • Don’t forget to add an Allow Everything rule on the entity level (e.g. on Level = 999)
1 Like