anchor.diff:  | CrmTask.ALARM_CUSTOM_3     | 12    | Application defined alarm type
   |===
   
  +The following application code listens for the +crmTask.alarm+ event and sends an email to the task owner.
  +Email subject will be the task name and email body will be the task description.
  +
  +[source,groovy]
  +.MyAlarmService.groovy
  +----
  +@Listener(namespace = "crmTask", topic = "alarm")
  +def alarm(data) {
  +    TenantUtils.withTenant(data.tenant) {
  +        def task = crmTaskService.getTask(data.id)
  +        def user = crmSecurityService.getUser(task.username)
  +        if (task) {
  +            sendMail {
  +                to user.email
  +                subject task.name
  +                body task.description
  +            }
  +        } else {
  +            log.error "Cannot find CrmTask with id [${data.id}]"
  +        }
  +    }
  +    null
  +}
  +----
  +
   == License
   
   {license}
  
positive.code: 
  === CrmTask
  
  [options="header"]
  |===
  | Property          | Type        | Description
  | number            | String      | The task's natural ID
  
negative.code: ----
  def result = crmTaskService.list([referenceType: 'crmContact',
      fromDate: '2014-07-01', toDate: '2014-07-31', complete: 0], [:])
  println "Found ${result.size()} tasks scheduled for July"
  ----
  
  === Setting task status
  
  A task keep track if it's completed or not. The +completed+ property is an +Integer+ constrained to 0-100 which represents
  how many percent completed the task is. The +CrmTask+ domain class has three constants that defines common/simple states of completion.
  These constants can be used when you don't need fine grained control of how many percent is complete.
  
  [cols="40,10,50"]
  |===
  | CrmTask.STATUS_PLANNED   |   0 | The task is not started (it's zero percent complete)
  | CrmTask.STATUS_ACTIVE    |  50 | The task is started but not yet completed (it's 50 % complete)
  