Add_fetch not working

I am trying to fetch data from one doctype to another on selecting of a link field.
But cur_frm.add_fetch isn’t working. Don’t know why ??

cur_frm.add_fetch('draft','template_name','template_name')

draft is the name of my doctype, 1st template_name is the field in draft from where i want to get value and 2nd template_name is the field where I want to put these values.

Was My mistake.

Solved

@nikzz please share how you corrected it.

https://erpnext.org/docs/user/manual/en/customize-erpnext/custom-scripts/custom-script-examples/custom-script-fetch-values-from-master

In simple

cur_frm.add_fetch('sm','sm_name','name_script');

Let say there are 2 doctype - Script Master & FASTRACK . Script Master has the data.
(Script Mater → Giving & FASTRACK ->Taking and using)

=> fastrack doctype’s field named ->[sm] here link filed of script master(like as naming series) is shown

=> fastrack doctype’s field named ->[name_script] data displayed based on sm selected

=> script master doctype’s field named->[sm_name]

Hope this will helpful for beginners this in simple