Client side script error

Hi,

i wondering why this error ?
cur_frm.cscript.std = function(doc,dt,dn) {
var d=local[dt][dn];
d.qty=doc.qty*d.std;
refresh_field(d.qty);
}

its said undefined local… its work on v4…

thanks

its locals, not local.

1 Like

you were right… its should be locals … sorry typo…
and the refresh_field ??.. its not working…please advise…

Looks like you’re passing the value of the field, not the field’s name.

try:

refresh_field(dn);

its doesnt work either…

try using cur_frm.set_value(“field_name” , “value” );
you don’t need to do a refresh then.
cur_frm.set_value(d.qty, doc.qty*d.std ); in your case

Hi… at last i did it with
refresh_field(“total_qty”,d.name,d.parentfield);