Custom Function Validation - What Determines Fields in "record"

Custom Function Validation - What Determines Fields in "record"

While attempting to setup a custom validator function on a field in the Accounts module I saw this bit of code

  1. entityMap = crmAPIRequest.toMap().get("record");
The only parameter passed to the function is the "crmAPIRequest", but the field I would like to access is not available in the "record" object of the parameter. There are 14 fields in the "record", but I can't seem to determine what causes a field to be in the "record" and where I might be able to change that. I don't seem to be able to adjust the parameter in any way.

Is there any way to change the fields in the "record" or am I stuck with what the system has decided to give me? Also, is there a better way to test/debug these validation functions? The only way I was even able to determine what fields were available in the "record" in the first place was by exposing the entire "crmAPIRequest" as the error message and then capturing it with dev tools in Chrome.