sheno
November 2, 2016, 10:33am
1
Lead ------------------------------------- Quotation
customer customer
organization organization
when we make a quotation from a lead
it catch only the customer name
i need to make a new field called Organization name
and make it fetch his data from that lead organization
so when i print the quotation i got
organization name
customer name
Thanks a lot dear for your guides
Add a custom field in Quotation doctype, name it same as in Lead doctype from Customize Form. It will fetch the value automatically.
sheno
November 3, 2016, 7:21am
3
Thank u dear for help
actually i added a costume field in quotation
Organization Name
type Data
but it did not fetch any thing
as u see it fetch the customer name only , not the organization name ,
Waiting your views dears
you need a custom script for that.
sheno
November 3, 2016, 7:29am
5
Offcourse dear thats is what i am asking for
i need to fetch the organization name from that leads organization and put it in the quotation
so when i see the quotation i see both fields
1- customer name
2-organization name
that are linked to that lead
sheno
November 3, 2016, 7:40am
7
great dear can u please help me to type it
is it true like this
frappe.ui.form.on(“Quotation”, “lead”, function(frm) {
var x = frappe.model.get_doc(“Lead”,frm.doc.key);
cur_frm.set_value(“organization_name”,x);
});
sheno
November 3, 2016, 7:50am
9
i made a custome script related to quotation doctype
and i past this in it
frappe.ui.form.on(“Quotation”, “lead”, function(frm) {
var x = frappe.model.get_doc(“Lead”,frm.doc.primary_key_of_lead); //key = name
cur_frm.set_value(“organization_name”,x.some_field_name);
Now the quotations is not open
in your browser, right click and then “inspect” to see the problem (works in chrome, I forgot how to do it in other browsers you can google it)
sheno
November 3, 2016, 10:42am
11
Thank u dear for your help
actually i am working on chrome.
But i successfully achieve my Goal using another Technics
i created a costume field in Quotation Doctype
Organization name
type data
Options lead.company_name
depend on lead
Read Only
And It works very well