Hi to all,
I’d like to set the description or the item name as a concatanation of other fields and static strings, for example:
item_code + " STATICSTRING "+item_group
Is it possibile? If yes how can I do it?
Thanks
Alessandro
Hi to all,
I’d like to set the description or the item name as a concatanation of other fields and static strings, for example:
item_code + " STATICSTRING "+item_group
Is it possibile? If yes how can I do it?
Thanks
Alessandro
When would this be set? On Save?
It should be possible using a custom field and custom script. Here are the rough steps:
More information on doing the client side script (through Custom Script) is here:
I try to write thi code in the section “Custom script” :
frappe.ui.form.on(“Item”, {
item_group: function(frm) {
frm.doc.description=frm.doc.item_group+" "+frm.doc.item_group;
}
});
But it doesn’t wokk
I’d like for example that on insert of item group the description value automtically change.
Is it possible?
Thanks
Alessandro
ok IT WORKS:
frappe.ui.form.on(“Item”, {
validate: function(frm) {
cur_frm.doc.description=frm.doc.item_group+" Aisi"+frm.doc.aisi+" Ø "+frm.doc.diametro+“x”+frm.doc.spessore+“x”+frm.doc.lunghezza;
}
});
Thanks