UI Builder - Display / hide form button on load of form dependent on field value.Issue There was a requirement to either display or hide a button on the form header dependent on the value of a field on the form. In ITSM one would achieve this either by use of a UI Policy (preferable) or an onload client script. Neither of these are an option in UI Builder though. To achieve this the following had been configured: 1. Button 'Button 1' had its 'Hide component' component visibility property bound to the state of an also configured 'hideButton' boolean client state parameter. 2. Client Script 'HideButton' was created to check the value of the record field in question that was being used to determine the visibility of the button. Dependent on the value of the field the state of the 'hideButton' boolean client state parameter was either set 'true' or 'false'. 3. The 'Page ready' event then had an event handler added to invoke the 'HideButton' client script. As a result of this it was found that the button would not hide.CauseThe cause for this was identified as being that the 'HideButton' client script was not able to retrieve the value of the field in question, so wasn't altering the state of the 'hideButton' client state parameter as expected. It was determined that the 'Page ready' event was not the correct place to be making the call to the 'HideButton' client script.ResolutionThe 'HideButton' client script needed to be called from the 'Data Fetch Succeeded' event handler of the corresponding 'Local data resource instance' instead, for the record being displayed on the form.