How i set formatter for party?

how i set formatter to add employee_name in party field

What is your use case?

As I see there is Employee Name field, so you can fetch employee name over there.

yes but i want like this…(Item_code and item_name)

you can add employee name field in grid view. or you have to add code for format party field.

refer this one,

frappe.form.link_formatters['Employee'] = function(value, doc) {
	if(doc && doc.employee_name && doc.employee_name !== value) {
		return value? value + ': ' + doc.employee_name: doc.employee_name;
	} else {
		return value;

but where i write this code??custom script??

Crete one file with your code and add it in public folder and try.


try this as Custom Script,

frappe.ui.form.on('Journal Entry', {
	onload: function(frm) {
		var df = frappe.meta.get_docfield("Journal Entry Account", "party",;
		df.formatter = function(value, df, options, doc) {
			return value? value + ': ' + doc.employee_name: doc.employee_name;
1 Like

Thank’s …