I tried to add button to each row if a list by referring to this doc:
https://frappeframework.com/docs/v13/user/en/api/list#standard-list-js
and adding this code:
button: {
show(doc) {
return doc.reference_name;
},
get_label() {
return 'View';
},
get_description(doc) {
return __('View {0}', [`${doc.reference_type} ${doc.reference_name}`])
},
action(doc) {
frappe.set_route('Form', doc.reference_type, doc.reference_name);
}
},
But I don’t understand what the doc.reference_name
and doc.reference_type
refer to.
Can some one please explain this?
Thank you