I have a field
Board_Name__c that is a lookup from Opportunity back to Opportunity. How can I dynamically find out that
Opportunity.Board_Name__c references the Opportunity sObject while
Opportunity.Account references the Account sObject?
In the describe for the Field there's a referenceTo property which indicates which type(s) the foreign key is for, e.g.
The docs have a section on the describe functionality