Any example to filter dynamic link field?
In documentation in the end it says “By default, the DocType link field will provide all the forms/docTypes for selection. If you wish this field to show certain specific docTypes in the search result, you will need to write Custom Script for it.” https://erpnext.com/docs/user/manual/en/customize-erpnext/articles/dynamic-link-fields
But I cannot find any example that how to do this?
I also have the same problem with dynamic link fields and creating a custom script.
On the Contract doctype under CRM, there is a “party_type” select option field if customer, supplier or employee. This is linked to a “party_name” dynamic link to select based on the “party_type”.
However, the complete name is not visible on the doctype so I create a data field “Full name” to appear the full name of supplier, customer or employee that was selected on the dynamic link.
How can I get the full name value since the fetch from is not applicable for dynamic links as per erpnext support.
I tried the if else custom script but still it did not work. Below is the script.
Go to payment entry in accounting there it is automatically fetching the party name I worked on it so I know maybe its doing the same thing you are trying to do?