Field Value not Showing after Save the Document


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= [];{
      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]);
frm.set_df_property('phone_number', 'options', number_list_value);



Please Help!

Could you find what caused this behavior?