For an incident record whose variables are inserted into 'question_answer' table using script, these variables do not appear as readonly when using "g_form.setVariablesReadOnly(true)"Issue When an incident record is created using script , and its variable values are inserted into 'question_answer' table using script, then these variables do not appear as read only in the variable editor. Even though there is a client script defined on 'incident' table to make all variables readonly using "g_form.setVariablesReadOnly(true)". The same script works fine when an incident record is submitted using a record producer.CauseUI macro of the OOB variable editor references 'sc_item_produced_record' table. When a record producer is submitted it creates entries in following two tables:1) 'question_answer' -> stores the variable values2) 'sc_item_produced_record' -> stores information about what record producer created what task record [in this case it is incident record]. For "g_form.setVariablesReadOnly" method to work records has to be present in both these tables.ResolutionWhen an incident record is created using script, if we also insert a record into 'sc_item_produced_record' table for the newly created incident record along with the variables whose values are inserted into 'question_answer' table using the script, then these variables will appear as read only when "g_form.setVariablesReadOnly(true)" is used. Sample script to insert record into 'sc_item_produced_record' table:var gr = GlideRecord("sc_item_produced_record");gr.initialize();gr.producer = "0c48963b1b83dc1056cf0d8fe54bcbaa"; // sys_id of the record producer gr.record_table = "incident";gr.record_key = "966ba7aa1b40a0d056cf0d8fe54bcbb0"; // sys_id of newly created incident record gr. task = "966ba7aa1b40a0d056cf0d8fe54bcbb0";gr.insert();