ASP.NET VETtrak API web services
ContentsIndexHome
PreviousUpNext
VT_API.UpdateClientTasks Method

Updates all enrolments that a client has in a task.

C#
[WebMethod(Description = "Updates all enrolments that a client has in a task")]
public TAuthenticate UpdateClientTasks(string token, string clientCode, string taskCode, string tastCode, DateTime startDate, DateTime? dueDate, DateTime statusDate, DateTime? completeDate, int? percentage, string description);
Parameters 
Description 
string token 
String containing a token 
string clientCode 
String client code of the client to complete enrolled tasks for. Maximum length 10 characters. 
string taskCode 
String code of the task to complete. Maximum length 20 characters. 
string tastCode 
Code of the status that is to be set against the enrolled tasks. 
DateTime startDate 
Date that the task was started. 
DateTime? dueDate 
Optional date that the task is due to complete. 
DateTime statusDate 
Date the task status was updated. 
DateTime? completeDate 
Date the task was completed. Required, and only allowed, when the task status is of the "completed" type. 
int? percentage 
Optional percentage value for the completion of the task. 
string description 
Optional string description to record against the task result. 

TAuthenticate indicating whether the update was complete.

This function updates all incomplete active enrolments in a single task that a single client has. 

This function will only update task enrolments that are not already complete, and will only update task enrolments that are in enrolments that have an active status. It is not possible to update an existing task result with this function, or "uncomplete" a task. To update a task enrolment that is already complete or is in a non-active enrolment, you can use UpdateEnrolledTask, and specify the single enrolled task to update. 

The clientCode parameter is the code of the client to update task results for. 

The taskCode parameter is the code of the task to update results for. If the client has no active enrolments in that task, nothing happens. 

Information about what tasks are available for a client can be discovered by using functions such as GetTasksForClient

The returned TAuthenticate object indicates whether or not the update was successful. 

A token is passed for authentication. If the authentication fails, or other errors occur, no result is recorded. The result of the authentication is represented by a TAuthenticate object. 

Requires a valid registration key entry for the Tasks feature. 

This function has security level "Protected", and can only be accessed by users that have explicitly been granted permission to the API.

Copyright (c) VETtrak 2022. All rights reserved.