I am trying to extend the Developer Guide example "Adding Field Validation to the Record View" method 1
I would like to work on the Contact record, but verify against a value from the related account.
For example, if the the user creates a new contact, and selects an account of type "internal", the UI should show an error and clear the account selection.
The above sample already gives me the framework, but I could not figure out how to access the type of the associated account.
How could this be done?