Am not able to msg print once i change the expense_typr

frappe.ui.form.on("Expense Claim Detail", "expense_type", function(frm, cdt, cdn) {
var d = locals[cdt][cdn];
 msgprint("sucuess event at " );

});`

@Sumit_Das

Import following package-
from frappe import msgprint
or
try using frappe.msgprint(" ")

Thanks,
Mohini

its not about msgprint …

there is no change or error in expense_type field change

@Sumit_Das
include you js file in hooks.py in doctype_js section
eg.
doctype_js = {
Expense Claim": [“custom_script/expense_claiml/expense_claim.js”],
}

1 Like

Am trying it at custom script section

@Sumit_Das

working for me

Hi the doctype will be

Expense claim
Or expense claim details

Use parent doctype as Doctype while writing a Custom Script on the child table.
Check given screen shot.

SyntaxError: Unterminated template literal
at Class.setup (http://107.170.4.109/assets/js/form.min.js:268:41)
at _f.Frm.setup (http://107.170.4.109/assets/js/form.min.js:18:561)
at _f.Frm.refresh (http://107.170.4.109/assets/js/form.min.js:58:26)
at Class.load (http://107.170.4.109/assets/js/form.min.js:15:111)
at http://107.170.4.109/assets/js/form.min.js:13:253
at Object.callback (http://107.170.4.109/assets/js/desk.min.js:579:371)
at Object.callback [as success_callback] (http://107.170.4.109/assets/js/desk.min.js:123:36)
at 200 (http://107.170.4.109/assets/js/desk.min.js:125:132)
at Object. (http://107.170.4.109/assets/js/desk.min.js:130:85)
at i (http://107.170.4.109/assets/frappe/js/lib/jquery/jquery.min.js:2:27151)

its show me an

error when am trying with doctype

remove ' from the end of the script.

thank you …