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

Retrieves a list of enrolled tasks that are mapped to an enrolled unit.

C#
[WebMethod(Description = "Retrieves a list of enrolled tasks linked to an enrolled unit")]
public TAuthTaskEnrolmentList GetEnrolledTasksForEnrolledUnit(string token, int enrolmentId, string unitCode);
Parameters 
Description 
string token 
String containing a token. 
int enrolmentId 
Integer ID of the enrolment to retrieve enrolled tasks for 
string unitCode 
String unit code of the unit to retrieve enrolled tasks for 

TAuthTaskEnrolmentList containing the list of enrolled tasks mapped to the enrolled unit

This function retrieves a list of enrolled tasks that are mapped to a single enrolled unit. Enrolled tasks include results. 

In VETtrak, a user can set up many:many mappings between enrolled units and enrolled tasks within one enrolment. This function retrieves those mappings from the point of view of an enrolled unit. 

The enrolmentId and unitCode parameters identify a single enrolled unit to retrieve enrolled tasks for. 

It is possible to specify an occurrence ID as the enrolmentId to get mappings linked to an occurrence itself, but the client and result-related fields of the enrolled tasks will be empty. 

Each enrolled task is represented by a TTaskEnrolment object. The list of enrolled tasks is in the returned TAuthTaskEnrolmentList object. 

Use the UpdateEnrolledTask function to update the result of a single enrolled task returned by this function. 

A token is passed for authentication. If the authentication fails, or other errors occur, no enrolled tasks are returned. 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 "Restricted". Users that have explicitly been granted permission to the API can use it with any parameters, otherwise, the logged-in client can only access their own data.

Copyright (c) VETtrak 2022. All rights reserved.