V13: How to override SCORE Function from Appraisal?

Hi all,

How can i override this Score funtion and only mine is run?

I want the score to be from 0 to 10

My custom_appraisal.js on public/js

frappe.ui.form.on(‘Appraisal Goal’, {

score: function(frm, cdt, cdn) {

    console.log('APPRAISAL CUSTOM');

    var d = locals\[cdt\]\[cdn\];

    //FIX 29-11-2025; Increased for 10

    if (flt(d.score) > 10) {

        frappe.msgprint(\_\_("Score must be less than or equal to 10"));

        d.score = 0;

        refresh_field('score', d.name, 'goals');

    }

    else {

        frm.trigger('set_score_earned');

    }

},

per_weightage: function(frm) {

    frm.trigger('set_score_earned');

},

goals_remove: function(frm) {

    frm.trigger('set_score_earned');

}

});

on Hooks i have added under app_include_js

But when running and type 8 my code is executed first and is ok but right after ERPNEXT calls its score function and resets to 0 and message screen is shown.