From 12d3cda2d9bf2d8b5fd1c8b74db3011ecace487a Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Mon, 4 Dec 2023 19:19:09 +0530 Subject: [PATCH] fix: get dynamic link with parenttype contact (cherry picked from commit 3d7ad71b22578e46366639ef19de8d665a922c04) --- erpnext/crm/doctype/lead/lead.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/crm/doctype/lead/lead.py b/erpnext/crm/doctype/lead/lead.py index deddd17234e..2d5b3573ae4 100644 --- a/erpnext/crm/doctype/lead/lead.py +++ b/erpnext/crm/doctype/lead/lead.py @@ -40,7 +40,7 @@ class Lead(SellingController, CRMNote): if self.source == "Existing Customer" and self.customer: contact = frappe.db.get_value( "Dynamic Link", - {"link_doctype": "Customer", "link_name": self.customer}, + {"link_doctype": "Customer", "parenttype": "Contact", "link_name": self.customer}, "parent", ) if contact: