Hi,
I have a report and i want to select default value of that report dynamically
for example
i have added 2 fields in user on field is named tenant
when i select above script report i need to show the logged in users tenant.
what have tried so far is this
let name of my report so in my_report.js file
i add this
frappe.query_reports["My Report"] = {
"filters": [
{
"fieldname": "tenant",
"label": __("tenant"),
"fieldtype": "Link",
"width": "80",
"options": "Tenant",
"get_query":function(){
var cur_log = frappe.query_report_filters_by_name.tenant;
cur_log.df.default = "TE000012";
cur_log.refresh();
cur_log.set_input(cur_log.df.default);
return cur_log
},
},
]
}
but i haven’t got it in the tenant field of my_report.js