Hi,
I have just updated my erpnext after that I am getting an error in my code written in custom script of Item Doctype.
In my another instance which I haven’t updated yet, it is working fine but in my current instance it is not updated it is still working fine.
below is my code:
if(!in_list(user_roles,"Item Create"))
{
frm.disable_save();
}
Error:
VM340:74 Uncaught ReferenceError: user_roles is not defined
at eval (eval at setup (form.min.js:268), :74:13)
at form.min.js:264
at form.min.js:264
at Function.map (jquery.min.js:2)
at Class.trigger (form.min.js:264)
at form.min.js:76
at form.min.js:264
at Function.map (jquery.min.js:2)
at Class.trigger (form.min.js:264)
at _f.Frm.setnewdoc (form.min.js:76)
Any idea what could be the cause and what is the solution?