Any way to make multiple fields read-only by same code in custom script

Is there any way to make multiple fields readonly (not all) once the doc is saved. What I using is

frm.set_df_property(['category'], 'read_only', frm.doc.__islocal ? 0 : 1)

and its working fine but once i add another field’s name, it stopeped working when I tried this

frm.set_df_property(['category','action'], 'read_only', frm.doc.__islocal ? 0 : 1)

or

frm.set_df_property([['category'],['action']], 'read_only', frm.doc.__islocal ? 0 : 1)

Actually I want to use minimal lines of code for doing so. Thats how I want to achieve this.
Any help/suggestions ??

1 Like

NVM, achieved so by using set only once in field customization