hello everyone,
I am trying to transfer values on the click event of a button field from my custom doctype Insurance Table to the dynamic link child table in the address doctype, so i have to do all the custom scripting on the click event of the button field.
i have tried :
add_address:function(frm){
var docname=cur_frm.doc.company_name
var new_address=frappe.new_doc(“Address”)
new_address.links[0].link_name=docname
}
but i am getting errors, any assistance will be appreciated.
Thanks but i do not think you understand what i want to do, I want to set values for a child table of another formso that when i instantiate it via the frappe.new_doc() method the prepopulated values will be already present, thanks again.
Use frappe.model.make_new_doc_and_get_name and populate the child table. I’m sure you’re aware of this, but it’s better not to do this as a custom script.