How to select specific doctypes that will hold values using dynamic link field

Good day
i want to specify some doctypes that will be fetched using the dynamic link field. I don’t want all the doctypes to be fetched. please I need your help

You can add a Custom Script in order to get the desired output.

For the filter query, refer this:

hi @harshit-30 can you help me on how to fetch data on a parent doctype and encode it on the child table using a dynamic link?

I was trying to fetch the data on a custom field on the parent doctype of the Sales Invoice then encode it on the child table payment entry references.

This is same on how the Supplier Invoice No. works. When the dynamic link is a Purchase Invoice, a supplier invoice no. field will be visible.