updates to form comment (post on enter) and global defaults
diff --git a/setup/doctype/global_defaults/global_defaults.js b/setup/doctype/global_defaults/global_defaults.js
index 631fd0b..e8a174b 100644
--- a/setup/doctype/global_defaults/global_defaults.js
+++ b/setup/doctype/global_defaults/global_defaults.js
@@ -16,7 +16,19 @@
 
 // Validate
 cur_frm.cscript.validate = function(doc, cdt, cdn) {
-  $c_obj(make_doclist(cdt, cdn), 'get_defaults', '', function(r, rt){
-    sys_defaults = r.message;
-  });
-}
\ No newline at end of file
+	$c_obj(make_doclist(cdt, cdn), 'get_defaults', '', function(r, rt){
+		sys_defaults = r.message;
+	});
+}
+
+cur_frm.fields_dict['default_territory'].get_query = function(doc,cdt,cdn) {
+	return 'SELECT `tabTerritory`.`name`,`tabTerritory`.`parent_territory` FROM `tabTerritory` WHERE `tabTerritory`.`is_group` = "No" AND `tabTerritory`.`docstatus`!= 2 AND `tabTerritory`.%(key)s LIKE "%s"  ORDER BY  `tabTerritory`.`name` ASC LIMIT 50';
+}
+
+cur_frm.fields_dict['default_customer_group'].get_query = function(doc,cdt,cdn) {
+	return 'SELECT `tabCustomer Group`.`name`, `tabCustomer Group`.`parent_customer_group` FROM `tabCustomer Group` WHERE `tabCustomer Group`.`is_group` = "No" AND `tabCustomer Group`.`docstatus`!= 2 AND `tabCustomer Group`.%(key)s LIKE "%s" ORDER BY	`tabCustomer Group`.`name` ASC LIMIT 50';
+}
+
+cur_frm.fields_dict['default_item_group'].get_query = function(doc,cdt,cdn) {
+	return 'SELECT `tabItem Group`.`name`,`tabItem Group`.`parent_item_group` FROM `tabItem Group` WHERE `tabItem Group`.is_group="No" AND `tabItem Group`.docstatus != 2 AND `tabItem Group`.%(key)s LIKE "%s" LIMIT 50'
+}