Since I'm learning...Need more script warning help

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!

I just watched the webinar and Paul demoed just what I needed to know. Great webinar, by the way!

gldni:
I just watched the webinar and Paul demoed just what I needed to know. Great webinar, by the way!

Hi Nicholas . Can you give me the URL of thje webinar? Thanks! JC

Hi JC. I just watched it live about an hour ago. Not sure if they have it uploaded yet.