Workflow Automation - Custom Function - Warning message

Workflow Automation - Custom Function - Warning message

I have a Custom Field set on Contacts called "Bad Debt?", with values being "Yes" or "No".

So now I'm trying to figure out how to, using Automation and Custom Functions, create a warning message that would pop up when any of users start an Estimate for a particular client, and the client has "Yes" in "Bad Debt?". 

Obviously, being a rookie in programming custom functions, I am struggling to get data for Customers from Estimate function.

Is what I'm trying to do even possible?