The generic message for when an object is not valid for a field is "... is not valid for this field". E.g. if the entered customer for an appointment cannot be found, it generates a message:
This could be due to a number of reasons:
- the object does not exist e.g. patient not found
- the object is inactive
- there is no current relationship between objects e.g. a customer no longer owns a patient
Change the message to "...does not exist or is not valid for this field" to provide a better indication as to why the
object is invalid.