I call a function when mouse blur from one field.
I have two fields like as category and mat code.
The mat code is like as(Category prefix+count)
ex:
FP001,FP002
Rm001,Rm002,Rm003,Rm004
i want max of counts+1 in particular category wise
ex:If i select FP category
Mat code is:FP003
if i select Rm category
Mat code is Rm005
Please read this
https://erpnext.com/user-guide/customize-erpnext/custom-scripts
I think people can help you on the forum if you are stuck, can’t write solutions for you.