Not saved status displayed in the doc when there is virtual field on refresh. How to fix it?

Screenshot from 2024-03-26 11-40-52

here employee name is virtual field.
When refreshed, i got not saved status.

here is the code

rappe.ui.form.on("Logi360 Employee and Branch", {
	refresh(frm) {
    employee_id(frm) {

function updateName(frm) {
    if (frm.doc.employee_id) {{
            method: "frappe.client.get",
            args: {
                doctype: "User",
                name: frm.doc.employee_id
            callback: function (data) {
                if (data.message) {
                    frm.set_value("employee_name", data.message.full_name);

hi @Prasant_Pant maybe instead of using set_value on js.
Use python function to achieve, so there will be no “Not Saved”.

Here some reference

1 Like