Make a toggle (check-box/button) to disable/enable all other field on the doctype

Hi! we want to make sure that customer that has been approved can’t be edit anymore can we lock this by creating a toggle that can enable and disable editing of the fields.

Ex: sales input the customer details, Once sales manager approves the customer he check the box to approve it hence the customer details can’t be edited anymore. Although if there are changes in customer details sales manager can uncheck the box and the field can be edited once again.

dear jo_jo,

you try someting like this,
create a checkbox for manager_approve_checkbox
then give permission level 1 to manager_approve_checkbox
give permission to your manager group/user level 1 for that doctype with read/write
and use below read_only property

if (frm.doc.manager_approve_checkbox == 1){

change field_1 with which fields suppose to be readyonly

hi thank you for your response. Currently i use workflow to handle this kind of event. but it restrict the whole doctype instead of selected field i will sure try your solution. thank you