Setting a reference field with a script returns "Invalid reference" if focus is on that fieldDescriptionTrying to set the value of a Reference field via a script, if the field, at the moment of being set, has focus, will fail and show the error "invalid reference". Steps to Reproduce 1 - Create an onLoad client script in incident table with the following content as example://setting the Configuration item field to 81f5cd4ac0a8018b2feb8243d0ed56a0function onLoad() {setTimeout(function(){ g_form.setValue('cmdb_ci','81f5cd4ac0a8018b2feb8243d0ed56a0'); }, 2000);}2 - Load the incident form and put the focus on the Configuration Item field by clicking on it.3 - After the 2 seconds defined in the script, the field will be filed with a value.4 - Click on another part of the form (another field for example) and see the message "invalid reference".5 - Repeat the steps above, without setting the focus on the "Configuration Item" field. Verify it works fine with no "invalid reference" message.WorkaroundThis problem is under review and targeted to be fixed in a future release. To receive notifications when more information becomes available, subscribe to this Known Error article by clicking the Subscribe button at the top right of this form. Related Problem: PRB1378588