Filtering values in Link field example

My Customer has to use a link field on the sales order for a doctype wich has at the end 300’000 rows of data…

I found the Documentation for Link fields ( and also dynamic link fields ) and at the end it describes to do a custom script action for filtering values in the link field…
https://docs.erpnext.com/docs/v14/user/manual/en/customize-erpnext/articles/dynamic-link-fields

Is there any simple example how to do that ?

nice… thx