Managing fields with UI Policy
In Chapter 3, Server-Side Control, we looked at Data Policies. These force a field to meet a condition by rejecting a database operation if it is necessary. The benefit of Data Policies is that it does not matter where the data came from. This will reject invalid updates from user entry, scripts, and even through web services, if the right options are set.
UI Policies have the same function, but they only work for browsers. They do have an advantage, however, since they work before the data is submitted to the instance, giving instant feedback to the user.
As discussed earlier, faster feedback to the user is often beneficial. However, UI Policies only request the browser to perform the check. While the ServiceNow admin controls the instance, we must assume that the user controls the browser. Later in this chapter, we will learn how a knowledgeable user can easily make the browser ignore any checks that you put in place.
Manipulating the form
In addition to making...