Forms are everywhere in ServiceNow. Every record you view is a form and every form can have multiple views.
It’s so easy to edit a form, just right click on the header and go to ‘Configure > Form Layout’ or ‘Personalize > Form Layout’ depending on your version. Here you can add news fields to a section, or add a completely new section or even create a brand new view.
Adding the form layout to an update set is different to adding a standard record such as a business rule. With a business rule, the business rule (sys_script record) is added to the update set with an insert_update action along with all the columns on the table (and it’s parent tables). Form layouts on the other hand are far more complex and is a set of a number of tables. Editing the position of one field requires the whole form to be stored again in the update set, including all sections and fields. They get added to the update set using a custom processor. In addition to adding the form to the update set, it also clears the cache.
This 99% of the time works perfectly with no issues, that percentage goes down when working on domain separated environments (that’s a different story altogether!). But that one time it goes wrong, you navigate to a form that you’ve edited and just deployed, and it looks completely funny! Sections missing, fields missing. What to do?