Hi,
I have created 2 custom fields(type = select) in the Appraisal template doc type.
namely : rating(Good, Bad, Excellent, Satisfactory,unsatisfactory) , Score(1,2,3,4,5)
these fields are created in a child table named goals, now i am have written a client script to execute on this child table but somehow it never works. Here is the code:
frappe.ui.form.on(“Appraisal Template Goal”, {
refresh(frm) {
{
if (cur_frm.doc.rating == “Excellent”)
{ cur_frm.set_df_property(“score”, “options”, [“1”,]);
} else if (cur_frm.doc.rating == “Good”)
{ cur_frm.set_df_property(“score”, “options”, [“2”,]);
} cur_frm.refresh_field(“score”);
}
}
});
ERPNext version : 14
I am new to this script writing & ERPNext customization but have reached here following a previous thread:
Any help in this regard will be appreciated.
Best Regards.