How to link a child table field of doctype A to another doctype field in erpnext

hi guys.
i’m trying to link a child table field of one doctype to another field of a different doctype. how do i go about pls