I'm very new to alpha five software (around 4 days), and I'm trying to make a transaction form with linking the header grid and the detail grid. But when I'm running the preview using chrome and inserting the value to the detail grid it says "record cannot be inserted because the linking field(s) are not updateable. check to see that the grid contains the linking fields, and that the control type for each linking field is set to an updateable control type". But all of my grid and field already have the updateable checkbox checked. Here's the code for the server side at "AfterInsertRecord" :
I'll attach some screenshoot and hope it'll help figuring out what's the problem.
Note on the screenshoot, ID at detail grid (below) before the error is for ID on Items table
3.png1.png2.png
Code:
DIM cn as SQL::Connection dim flagResult as l flagResult = cn.open("::Name::prob") if flagResult = .f. then ui_msg_box("Error","Could not connect to database. Error reported was: " + crlf() + cn.CallResult.text) end end if cn.PortableSQLEnabled = .f. dim itemid as c itemid = e.submitted.Item_ID dim qty as c qty = e.datasubmitted.Transaction_Detail_Quantity dim tujuan as c tujuan = e.datasubmitted.To_From_Locker_ID dim sqlUpdateData as c sqlUpdateData = <<%sql% UPDATE locker_detail SET Lockered_Item_Quantity = Lockered_Item_Quantity + {qty} WHERE Lockered_Item_ID = '{itemid}' and Loker_ID = '{tujuan}' %sql% sqlUpdateData = evaluate_string(sqlUpdateData) flagresult = cn.Execute(sqlUpdateData) if flagResult = .f. then ui_msg_box("Error","Could not connect to database. Error reported was: " + crlf() + cn.CallResult.text) end end if
I'll attach some screenshoot and hope it'll help figuring out what's the problem.
Note on the screenshoot, ID at detail grid (below) before the error is for ID on Items table
3.png1.png2.png
Comment