How to fetch data in custom Doctype

I had doc type name Deal, Based on deal, i will create Quotation, i need to fetch deal data in quotation fields.


These data need to fetch in Quotation.


Deal Customization


Even tried deal.lead_name
But still not data fetch from deal to quotation.
How to fetch these datas.

@Mohamed2335 it’s custom_opportunity .

Thanks for the Response,but it not reflect.


still same issue
Also Tried custom_opportunity.lead_name

I did not see you create a Link field in Quotation to select Deal…

Opportunity is Deal Doc type name

any solution?

still not get proper solution

Hi @Mohamed2335, you can implement a server side script in your custom doctype Deal for the same. You can write a script to create a new Quotation document with the required data when your Deal document is saved.

For further reference to frappe document api refer:
https://frappeframework.com/docs/user/en/api/document