Editable grid mode sc_field_readonly in onRecord event

I tried this macro, but I doesn’t work.

I try to disable a field in the “editable grid mode” based on a field value. Any ideas?

if ({id} == ‘62’) // Set as read-only
{
sc_field_readonly({test}, ‘on’)
}else{
sc_field_readonly({test}, ‘off’)
}

Hi Zaz,
in an onRecord event of a editable grid you should use

sc_field_disabled_record()

Hope this will help.

Sincerely
Gunter Eibl

Thanks a lot!

sc_field_disabled_record(“record_name”) works perfect!