Script for Customizing options in the Doctype Link field

I have dynamic Doctype field and link field as shown in Dynamic Link Fields

I have added these fields in a child table of Sales Partner.

I need script to limit docTypes list to only [Brand,Item, Territory]