What record is this template for. I only ask because when you start changing a template for an out of the box transaction like salesorder or an invoice the editor would reference the object as record so instead of transaction.duedate you would have record.duedate.