@NCP I am adding two button in Sales Person List But I am not showing both button in list I can Show only one button in list which is in last
I already check this and also try to add dropdown button
frappe.listview_settings[“Sales Person”] = {
hide_name_column: true,
add_fields: [“supplier_cf”, “custom_user_id”],
onload: function (me) {
me.page.set_title(__(“Sales Person List”));
},
button: {
show: function (doc) {
return !!doc.supplier_cf;
},
get_label: function () {
return __(“View Payout”);
},
get_description: function (doc) {
return __(“View Purchase Invoices for Supplier {0}”, [doc.supplier_cf]);
},
action: function (doc) {
frappe.set_route(“List”, “Purchase Invoice”, {
supplier: doc.supplier_cf,
});
},
},
button: {
show: function (doc) {
return !!doc.custom_user_id;
},
get_label: function () {
return __(“User”);
},
get_description: function (doc) {
return __(“View User for Supplier {0}”, [doc.custom_user_id]);
},
action: function (doc) {
frappe.set_route(“Form”, “User”, doc.custom_user_id);
},
},
};
this is my code
If is there any issue then let me know please.
Your code is wrong, So I told you to read the documentation carefully and I have provided the code in it and also provided its output. So please see it calmly and apply without any additional communication. If you do it without understanding the concept, you will not know anything.
okay no problem