Help! Please! I am having an issue with a table level script. Below is the script I have in the function UpdateRecord() area. I expect 29 records to be created in the table DueDiligence and they do get created. However, the only field that populates with data is due_propertyid (because it is hardcoded).
I reviewed the logs. The SQL log shows nothing and the ewaresystem.log displays the following.... ExecuteTableLevelScript - error:Invalid filename. I am not sure what this error means. I ran the SQL statement on an asp page and displayed the field values on the screen with response.write. Therefore, I think the SQL statement is correct.
Hoping someone can tell me why none of the fields are populating from my query. Any assistance you can provide would be greatly appreciated!
if (prop_cs_stage == 'DueDiligence')
{
var mySQL = "SELECT * FROM vDueDiligenceItem";
var DDcklist = CRM.CreateQueryObj(mySQL,"");
DDcklist.SelectSql();
with(DDcklist)
{
while (!eof)
{
var DDrec=CRM.CreateRecord("DueDiligence");
DDrec.due_DDiligenceItemId = DDcklist.duim_DDiligenceItemId;
DDrec.due_propertyID = '222';
DDrec.due_description = DDcklist.duim_description;
DDrec.due_DocumentID = DDcklist.duim_DocumentID;
DDrec.SaveChanges();
DDcklist.NextRecord();
}
}
}