I want to know how to fetch data of current row which i have clicked
code reference
{
fieldname: “item_name_visit_item”,
label: __(“Item Name”),
fieldtype: “Link”,
options: ‘Item Name AP Prod’,
in_list_view: 1,
columns: 1,
get_query: function () {
console.log(this.doc.brand_visit_item)
const brand = dialog.fields_dict.visit_details.grid.get_selected().brand_visit_item;
const itemGroup = dialog.fields_dict.visit_details.grid.get_selected().item_group_visit_item;
return {
query: ‘app_name.controllers.queries.item_name_visit_item_query’,
filters: {
‘associate_brand_item_ap’: brand,
‘associated_item_group_item_ap’: itemGroup
}
};
}
}
cur_dialog.fields_dict.visit_details.grid.wrapper.on(“click”, function() {
const selectedRow = cur_dialog.fields_dict.visit_details.grid.get_row()
console.log(“Currently selected row:”, selectedRow);
});