Fields disabled stays "internally" disabled even after reloading app

Hi everyone, I’m using Scriptcase 8.1.046, installed yesterday, but this problem is present since at least 8.1.042.

I have a form where some rows are disabled dinamically, based on field value, and using the sc_field_disabled_record macro in the onLoadRecord event). This works ok. The fields on some rows are editable and some are not editable depending on the data.

But then the user could use a custom button to execute a procedure in the database (using MS-SQL Server). The page reloads and the data could have changed. This time, every row is editable. This is also working.

But then the user modifies data and saves one or more rows: The first row is NOT saved. I used SQL Profiler to view the SQL Sentence that’s run against the DB, and Scriptcase executes an UPDATE but the values are the original ones, not the edited ones.

Why? Because the row is editable but internally Scriptcase mantains the disabled status. Even if I re-enter the app from the menu, the internal disabled status remains.

How do I know? I follow the Scriptcase internals and found the disabled status is mantained in an session variable (an array)

$_SESSION[‘sc_session’][$this->Ini->sc_page][‘metaDirector_form_calculos’][‘sc_disabled’]

“metaDirector_form_calculos” is my form name.

But this array is NOT reset even if I reload the app using an sc_redir or re-enter the app from the menu. I must enter another app and then return to this one for the [‘sc_disabled’] array to be reseted.

Why is this a bug? Because the fields are editable but internally ScriptCase got them as disabled in the array.

Any ideas about how to solve or a workaround that does not involver touching the scriptcase inner working?