How to make a table field searchable in another doctype

Could you tell why the issue with saving the doctype after selecting an existing record from the Custom Doctype ?

Fixed.

The value Unique was set for the name field. Disable that and everything will be ok.

Note: you cannot disable unique field value if you have an auto name field set.