I am getting the following error when seeting up a form view - based upon the example

Message: 'data.contractTermFrom' is null or not an object

The text box I am assiging the value to is working and loading the data - but am consistentyly getting a JS error - regardless of what store field I assign - even though it loads OK into the textfield.




function dataChanged() {


var record = this.getAt(0) || {};


<%= txtInsuranceCompanyName.ClientID %>.setValue(record.data.insuranceCompanyName);


}