From 29abc389ebbe1c297e005de987cd3d43c6d1ece1 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Fri, 31 Aug 2012 13:39:18 +0530 Subject: [PATCH] run communication list if a new communication is added --- erpnext/support/doctype/communication/communication.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/erpnext/support/doctype/communication/communication.js b/erpnext/support/doctype/communication/communication.js index 59e2ee9c55..af92710bbd 100644 --- a/erpnext/support/doctype/communication/communication.js +++ b/erpnext/support/doctype/communication/communication.js @@ -90,6 +90,9 @@ cur_frm.cscript.render_list = function(doc, doctype, wrapper, ListView, make_new } var record_list_view = new RecordListView(doctype, wrapper, ListView); + if (!cur_frm[doctype.toLowerCase().replace(" ", "_") + "_list"]) { + cur_frm[doctype.toLowerCase().replace(" ", "_") + "_list"] = record_list_view; + } }); } @@ -110,4 +113,9 @@ cur_frm.cscript.contact = function(doc, dt, dn) { }, }); } +} + +cur_frm.cscript.hide_dialog = function() { + if(cur_frm.communication_list) + cur_frm.communication_list.run(); } \ No newline at end of file