Data policies
Data policies, unlike UI policies, execute on the server. They are closely linked to UI policies in terms of behavior and functionality. They can even be used as UI policies on the client, when implemented (however, with limited functionality). Strangely, data policies reside in the sys_data_policy2
table. That 2
is not a typo; it has been that way at least as far back as Eureka.
Data policies allow you to prevent certain changes on the server, by rejecting database updates that don't fit the criteria laid out in the data policy. You can either prevent edits by making a field read only, or you can require a field value by making a field Mandatory, using a data policy rule.
While data policies can be used as UI policies on the form, they lack some functionality provided by UI policies. You cannot, for example, make a field visible or hidden using data policies, because there is no server-side equivalent of a contextually hidden field. There is also no advanced view, no scripted...