Tasks & Notes

model.CreateTaskNote(ownerId, aboutPersonId, assigneeId, roleId, isNote, instructions, notes, dueDate, keywordIdList, sendEmails)
Parameters:
  • ownerId (int) – PeopleId of the person who owns the Task. This is a required field.

  • aboutPersonId (int) – PeopleId of the person the Task is about. This is a required field.

  • assigneeId (int) – PeopleId of the person the Task is assigned to. This is an optional field.

  • roleId (int) – RoleId of the Role you want to limit the Task or Note to. This is an optional field.

  • isNote (str) – Boolean. This will either take a 1 or 0, depending on true or false, or a “True” or “False.” This field is for telling the api how to save this Task or Note.

  • instructions (str) – String, for a Task or Note.

  • notes (str) – String, for a Task or Note.

  • dueDate (date) – Due date for the Task. This is an optional field.

  • keywordIdList (list) – List of the KeywordIds that you want to assign to the Task or Note. This is an optional field. These are the acceptable formats: [1,2,3,4,5] or (1,2,3,4,5) or {[1],[2],[3],[4],[5]}

  • sendEmails (bool) – This optional field determines whether a notification email will be sent to the assignee. If omitted, the default is True (an email will be sent).

A Task will be created for the minister (lay or staff person). This person must be a User, i.e. have an account to login with. The Task is a ministerial Task, presumably to contact the person the Task is about.

By default, an email will be sent to the minister with a link to complete the Task with a Note record, but this email can be disabled by setting the sendEmails parameter to False.

model.GetTaskNoteKeywordIds(taskNoteId)
Parameters:

taskNoteId (int) – Required. The Task/Note ID. To find this, use SQL or, if creating the Task/Note programmatically, retrieve it from the CreateTaskNote function.

Get a list of KeywordIds for a given TaskNote.

model.SetTaskNoteKeywordIds(taskNoteId, keywordIds)
Parameters:
  • taskNoteId (int) – Required. The Task/Note ID. To find this, use SQL or, if creating the Task/Note programmatically, retrieve it from the CreateTaskNote function.

  • keywordIds (int[]) – An array of keyword IDs that the Task/Note should have. Any other Keywords that the Task/Note already has will be removed.

Updates the keywords for a given Task/Note to match the new list. Any other Keywords that the Task/Note already has will be removed. If you use Extra Values connected to these keywords, you may find that this function affects the User’s view of Tasks/Notes in ways you may not want.

model.SetTaskNoteStatus(taskNoteId, status)
Parameters:
  • taskNoteId (int) – Required. The Task/Note ID. To find this, use SQL or, if creating the Task/Note programmatically, retrieve it from the CreateTaskNote function.

  • status (int|string) – The new status for the Task/Note. Can be ‘Complete’, ‘Pending’, ‘Accepted’, ‘Declined’, ‘Archived’, or ‘Note’. Can also be the corresponding numerical IDs used in the database.

Update the status of a Task. Also can be used to convert a Note to a Task or vice versa. This will NOT validate Extra Values or required content on the Task/Note. This does NOT send emails notifying anyone about the change.



Latest Update

1/28/2023

Document created with new functions for Tasks/Notes