/*
The log cursor selects all the communications made by one contact.
*/
dbconnect();
log = database.cursor("SELECT * FROM calls WHERE contactid =" + request.contactid)
contact = database.cursor("SELECT firstname, lastname FROM contacts WHERE contactid =" + request.contactid)
write("")
if(contact.next()) {
write("
Log of communications with " + contact.firstname +" " + contact.lastname + "")
}
Click on subject hyperlink to view communication notes:
/*
This loop outputs all the rows that the log cursor selected and displays it in a table format in the upper right
frame. The user can then click on the subject hyperlink and the notes taken during the communication will be displayed
in the lower right frame(detail.html).
*/
write("Date | Time | Subject | |
")
while(log.next()) {
write("" + datetoString(log.calldate) + " | " + log.calltime + " | " + log.subject + " | ")
write("
")
}
write("
")