Can someone help me with the proper way to handle this warning (the warning is toward the bottom of the method in the ‘if’ statement):
/**
* Handle a drop.
*
* @param {JSEvent} [event] the event that triggered the action
*
* @returns {Boolean}
*
* @properties={typeid:24,uuid:"B6689DE8-9AB5-48C9-BADA-51B9C6A6F496"}
*/
function onDrop(event)
{
//Declare variables
var record;
var fs;
var input;
var md;
//Get the Alerts record object (which were set in the onDrag method on the Alerts_List_Pat_Alerts form) from the event.data property of the event and process them
for(i in event.data)
{
record = event.data[i];
//Show last test date dialog
md = application.createWindow('lastTestDate',JSWindow.MODAL_DIALOG);
md.title = 'Last Test Date';
//Pass Window Name
globals.g_WindowName = md.getName();
forms.Alerts_Test_Date_Dialog.controller.show(md);
// input = application.showFormInDialog(forms.Alerts_Test_Date_Dialog,-1,-1,306,180,'Last Test Date',false,false,'Last Test Date',true);
// if(input == true){
if(foundset.newRecord())
{
//Not sure what to do about this warning
alerts_id = record.alerts_id; //Warning: The property alerts_id is undefined in record
last_test_date = forms.Alerts_Test_Date_Dialog.testDate;
patient_id = globals.g_Active_Patient_ID;
}
// }
}
databaseManager.saveData();
return true;
}
record.alerts_id gives me the value I’m looking for, just don’t know how to get rid of the warning.
Thanks!