How to pre populate the fields data when we click on the create a new document?

In short,
How to pre populate some fields when you click on the link option which is “create a new document”??

See this image and i want that how I can target the option in the link field which is create a new document ( here document is basically depends on the Doctype).

I want that when I click on this option, some of fields must be pre populated in that document.

I know one thing which is frappe.new_doc and we can write in this in the object form.
But how can I run that function when I click on that option.

How i can target that option in that link field which can help me to pre populate the fields in that document.

@ajaymahiwal check this Creation by link autofill field in new doc

But where is solution ??? Can you please tell or @NCP

You have to create a button and then apply the logic, i think, directly not possible, that for you have to check the core functionality of “Create a new”.

This is possible by using get_route_options_for_new_doc