Field Value not Showing after Save the Document

Hi,

Use Case

  1. I have created a doctype in which we have store the information. one of them is Mobile number List which are from lead document…
  2. I have store the Mobile number in select type field.
  3. When save the document value are showing in select type field but after refresh or clear the cache of document value is not showing but value is saved in the database.

below are the custom script.

frappe.ui.form.on('Call Disposition', {
  lead: function(frm) {
var number_list = [];
var number_list_value= [];
    frappe.call({
      method: "frappe.client.get_list",
      args: {
        doctype: "Lead",
        fields: ['primary_phone', 'mobile'],
        filters: {
          name: cur_frm.doc.lead, 
	 },
        
      },
       callback: function(r) {
       	number_list = r.message;
        var options = number_list[0];
        number_list_value= Array.from(Object.keys(options), k => options[k]);
number_list_value=number_list_value.filter(Boolean);
frm.set_df_property('phone_number', 'options', number_list_value);
frm.refresh_field('phone_number');

}
    });

}
});
3 Likes

Please Help!

Could you find what caused this behavior?