diff --git a/frappe/public/js/frappe/ui/toolbar/search.js b/frappe/public/js/frappe/ui/toolbar/search.js index 04f7b53dee..81cb1694cc 100644 --- a/frappe/public/js/frappe/ui/toolbar/search.js +++ b/frappe/public/js/frappe/ui/toolbar/search.js @@ -364,7 +364,7 @@ frappe.search.GlobalSearch = Class.extend({ }, format_result: function(result) { - var name, route = '#Form/' + result.doctype + '/' + result.title; + var name, route = '#Form/' + result.doctype + '/' + result.name; var description = this.get_finds(result.content, this.keywords); if(result.doctype === "Communication") { if(description.indexOf(',') === -1) { @@ -373,7 +373,7 @@ frappe.search.GlobalSearch = Class.extend({ name = description.slice(description.indexOf(':') + 8, description.indexOf(',')); } } else { - name = result.title; + name = result.name; } return [route, this.bold_keywords(name), description]; }, @@ -544,9 +544,9 @@ frappe.search.GlobalSearch = Class.extend({ var make_option = function(data) { return { - label: __("{0}: {1}", [__(data.doctype).bold(), data.title]), - value: __("{0}: {1}", [__(data.doctype), data.title]), - route: ["Form", data.doctype, data.title], + label: __("{0}: {1}", [__(data.doctype).bold(), data.name]), + value: __("{0}: {1}", [__(data.doctype), data.name]), + route: ["Form", data.doctype, data.name], match: data.doctype, index: 60, default: "Global",