[size="4"]*
I put javascript API on JavaScript Onload event* to disable some AUTOFILL field in my add page to prevent users manually input the fields. IT WORKS on add page and no error occur when i click the save button. Field [color="#0000FF"]NO_RANGKA and value.
var ctrlRangka = Runner.getControl(pageid, 'NO_RANGKA');
var ctrlAhmCode = Runner.getControl(pageid, 'TYPE_AHM_CODE');
ctrlRangka.setDisabled();
ctrlAhmCode.setDisabled();
End
[b]screenshot 1:**

.. but when i browse the database using my Database editor, both field NO_RANGKA and field TYPE AHM CODE are empty. Is It a bug??
screenshot 2:

Note: i tried to delete the javascript from Javascript onloaad event and everything works fine (all fields enabled and field values sucesfully inserted to database)
[size="4"][color="#FF0000"]PROBLEM 2: Custom Code in [b]After record added . [/b][/size]
I want to update a field in another table with this code:
$sql = "UPDATE mst_unit_smh SET unit_status= 'SOLD' WHERE no_mesin=" . $values["NO_MESIN"];
CustomQuery($sql);
error happened on add page when i click the save button :

... i tried to manually use the query in third party MySQL editor :
UPDATE mst_unit_smh SET unit_status= 'IN STOCK' WHERE no_mesin='JB91E2379188'
Success.. The query update unit_status field in the mst_unit_smh table ( just add the ' sign in the beginning and end of JB91E2379188
[size="4"].[/size]
I want insert records to another table with this code:
global $conn;
$strSQLInsert = "insert into sls_kng_confirm (CUST_ID, NO_SPK, NO_MESIN, NO_RANGKA, TYPE_AHM_CODE) values (".$values["CUST_ID"].", ".$values["NO_SPK"].", ".$values["NO_MESIN"].", ".$values["NO_RANGKA"].", ".$values["TYPE_AHM_CODE"].")";
... AN RETURN ERROR:

what's wrong with my code?