# Desktop Task

| Description                            |     Type     |         Direction        |                       Data Type                       | Remarks                                                                                                         |
| -------------------------------------- | :----------: | :----------------------: | :---------------------------------------------------: | --------------------------------------------------------------------------------------------------------------- |
| AllowDepartments                       |   Property   |        Read Write        |                        Boolean                        | Allows Task to be assigned to a Department                                                                      |
| AssertValidOrganisationID              |      Sub     |           Read           |                                                       | <p>Validates that a Task cannot be assigned to a department when</p><p>the AllowDepartments flag is not set</p> |
| AssignedTo                             |   Property   |        Read Write        |                          Long                         | Organisation Hierarchy ID of the User or Department that the task is assigned to.                               |
| Cancel                                 |      Sub     |           Write          |                                                       | Sets the Task Status to Cancelled                                                                               |
| ClassificationID                       |   Property   |           Read           |                          Long                         | Returns either the User or System Classification ID of the Task                                                 |
| CodeTableHandler                       |   Property   |           Write          |                                                       | Sets reference to Code Table for Task                                                                           |
| Complete                               |      Sub     |           Write          |                                                       | Completes Task and sets Status to 'Completed'                                                                   |
| Parameters:                            |  CompletedBy |           Long           |                                                       |                                                                                                                 |
| CompletionDate                         |    Variant   |                          |                                                       |                                                                                                                 |
| CompletionReason                       |    String    |                          |                                                       |                                                                                                                 |
| CompletedByUserOrganisationID          |   Property   |           Read           |                          Long                         | Completed By Organisation ID                                                                                    |
|                                        |   Property   |           Write          |                          Long                         |                                                                                                                 |
| CompleteTaskFromActions                |      Sub     |           Write          |                                                       | Completes Task when all Actions Complete                                                                        |
| CompleteTasksFromActions               |   Property   |        Read Write        |                        Boolean                        | Complete Task when all Actions Complete flag                                                                    |
| CompletionDate                         |   Property   |        Read Write        |                        Variant                        | Completion date                                                                                                 |
| CompletionReason                       |   Property   |           Read           |                         String                        | Completion Reason                                                                                               |
| DefaultTaskSubjectFrom TaskDescription |      Sub     |           Write          |                                                       | Set Task Subject from Task Description                                                                          |
| Description                            |   Property   |        Read Write        |                         String                        | Task Description                                                                                                |
| DisableCRMCallStatusUpdate             |   Property   |        Read Write        |                        Boolean                        |                                                                                                                 |
| EmailNotification                      |   Property   |        Read Write        |                        Boolean                        | Allows Notification of Task via Email                                                                           |
| GatewayFields                          |   Property   |           Read           |                         Object                        | Collection of CRM Gateway field objects                                                                         |
| GetDefaultAssignedTo                   |   Function   |           Read           |                          Long                         | Returns the default Organisation ID of Assigned To User/Department                                              |
| GetEscalationUser                      |   Function   |           Read           |                                                       | Returns escalation User/Department                                                                              |
| Initialise                             |      Sub     |           Write          |                                                       | Initialises the Task object                                                                                     |
| InitialiseCodeTableHandler             |      Sub     |           Write          |                                                       | Initialises the Code Table Handler                                                                              |
| IsValidOrganisationID                  |   Function   |           Read           |                                                       | Validates User/Department Organisation ID                                                                       |
| Parameter:                             | AssignedToID |          String          |                                                       |                                                                                                                 |
| MailMergeID                            |   Property   |        Read Write        |                          Long                         | Link to generated Mail Merge Letter                                                                             |
| MailMergeLetterID                      |   Property   |        Read Write        |                          Long                         | Link to Mail Merge Letter                                                                                       |
| MailMergeSourceID                      |   Property   |        Read Write        |                          Long                         | Link to CRM Call for Mail Merge                                                                                 |
| MailMergeTypeID                        |   Property   |        Read Write        |                          Long                         | Link to Mail Merge 'sub-system'                                                                                 |
| Refer                                  |   Function   |           Write          |                        Boolean                        | Assigns Task to another User / Department                                                                       |
| RequiredByDate                         |   Property   |        Read Write        |                        Variant                        | Required By Completion Date of Task                                                                             |
| SetGatewayFields                       |      Sub     |           Write          |                                                       | Initialises collection of CRM Gateway fields                                                                    |
| SetGatewayValue                        |      Sub     |           Write          |                                                       | Initialises CRM Gateway field with supplied value                                                               |
| Parameters:                            |   FieldName  |          String          | OMFAX Repair Diagnostics / General Enquiry field name |                                                                                                                 |
| Value                                  |    Variant   | Value to pass to ActiveH |                                                       |                                                                                                                 |
| SourceRecordID                         |   Property   |        Read Write        |                          Long                         | Link to CRM Call                                                                                                |
| SourceTypeID                           |   Property   |        Read Write        |                          Long                         | Link to 'sub-system'                                                                                            |
| StatusID                               |   Property   |           Read           |                          Long                         | Task Status:  Values of 'Registered', 'Live', 'Completed', 'Cancelled'                                          |
| Subject                                |   Property   |        Read Write        |                          Long                         | Task Subject                                                                                                    |
| SystemClassificationID                 |   Property   |        Read Write        |                          Long                         | Classification ID for a System Task                                                                             |
| SystemTask                             |   Property   |        Read Write        |                        Boolean                        | System Task flag                                                                                                |
| TaskActions                            |   Property   |           Read           |                       Collection                      | Returns collection of Actions                                                                                   |
| TaskAssignments                        |   Property   |           Read           |                       Collection                      | Returns collection of Assignments                                                                               |
| TaskEmailAddressees                    |   Property   |           Read           |                       Collection                      | Returns collection of Email Addressees                                                                          |
| TemplateDescription                    |   Property   |        Read Write        |                         String                        | Task Template Description (Task Templates only)                                                                 |
| TemplateName                           |   Property   |        Read Write        |                         String                        | Task Template Name (Task Templates only)                                                                        |
| UDEChanged                             |      Sub     |           Write          |                                                       | Set Mandatory Fields Filled flag for User Defined Elements                                                      |
| UDERow                                 |   Property   |           Read           |                         Object                        | User Defined Elements object                                                                                    |
| Uncancel                               |      Sub     |           Write          |                                                       | Sets status from 'Cancelled' to previous status                                                                 |
| Uncomplete                             |      Sub     |           Write          |                                                       | Sets status from 'Completed' to previous status                                                                 |
| UserClassificationID                   |   Property   |        Read Write        |                          Long                         | Classification ID for a User Task                                                                               |
| ValidSystemClassifications             |      Sub     |           Read           |                       RecordSet                       | Returns valid System Classifications                                                                            |
| ValidUserClassifications               |      Sub     |           Read           |                       RecordSet                       | Returns valid User Classifications                                                                              |

### Associated SQLActiveH database table data

The MIS-AMS SQLActiveH Gateway's Desktop Task Object (**CTSKTask**), is linked to the **Tasking\_Tasks\_T** table in the MIS-AMS SQLActiveH database. When the object properties and methods are written to by Keyfax, the MIS-AMS CRM processes the values and writes to the underlying database table.

{% hint style="info" %}
**NOTE** Some methods (Functions and Subs) in objects also access other (unknown) related views and tables. The following list identifies only those columns in the**Tasking\_Tasks\_T** table which Keyfax writes to in the current version:
{% endhint %}

| Object property        | Tasking\_Tasks\_T column   | Datatype      |
| ---------------------- | -------------------------- | ------------- |
| SystemTask             | System\_Task\_BT           | bit           |
| SystemClassificationID | System\_Classification\_ID | int           |
| Subject                | Subject\_VC                | varchar(100)  |
| Description            | Description\_VC            | varchar(2000) |
| MailMergeTypeID        | MailMerge\_Type\_ID        | int           |
| MailMergeLetterID      | MailMerge\_Letter\_ID      | int           |

{% hint style="info" %}
**NOTE** This data was correct at the time of writing, but Omfax suggest that MIS-AMS are consulted on any database or object schema modifications unknown to Omfax.
{% endhint %}

In addition the SetGatewayValue method of the **CTSKTask** object is used by Keyfax to pass SubAction values for use in email and mail merge tasks. These are written to the **usr\_Tasking\_Tasks\_UDE\_1\_T** table to columns as configured on a site by site basis in MIS-AMS SQLActiveH CRM. For more information please consult MIS.
