CRM REST JavaScript - Bad Request: Error processing request stream

CRM javascript dynamics crm programming

Sometimes I'm tired and forgetful, and in a rush. Never a good combination. I was writing some form based JavaScript to programmatically create child-records using the REST API in Dynamics CRM 2015 and encountered the following error in a nasty JavaScript alert dialog.

Error: 400: Bad Request: Error processing request stream. The property name 'field_Name' specified for type 'Microsoft.Crm.Sdk.Data.Services.field_Name' is not valid.

The attribute in question was a DateTime field, so I was stuffing around checking the supported format of dates and wondering if something was being lost in translation. But to no avail.

To cut a long story short, I'd forgotten that I needed to specify the Schema name of the attribute and this is Case Sensitive. Once I had the case correct everything worked well again.