From f58a0d758341933bc96801640ad4dc285f30a223 Mon Sep 17 00:00:00 2001 From: Muhammad Umer Farooq <35496058+umer2001@users.noreply.github.com> Date: Wed, 20 Nov 2024 13:58:51 +0700 Subject: [PATCH] feat: append custom options to response in ControlLink (#280) --- frappe/public/js/frappe/form/controls/link.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frappe/public/js/frappe/form/controls/link.js b/frappe/public/js/frappe/form/controls/link.js index b6c86bf5a3..b4a2f6ef84 100644 --- a/frappe/public/js/frappe/form/controls/link.js +++ b/frappe/public/js/frappe/form/controls/link.js @@ -309,6 +309,10 @@ frappe.ui.form.ControlLink = class ControlLink extends frappe.ui.form.ControlDat r.message = r.message.concat(custom__link_options); } + if(frappe?.custom_options &&(frappe?.custom_options[me.df.fieldname] ?? []).length) { + r.message = r.message.concat(frappe.custom_options[me.df.fieldname]); + } + // advanced search if (locals && locals["DocType"]) { // not applicable in web forms