Auto fetch for Xurrent
For any value fetched by Xurrent functions the auto fetching feature is active. This means that along the data model there is no need for manual fetching - this is done by the automator engine. Then resulting code is much more readable, maintainable and easier to develop.
If a value can not be fetched because it is missing in Xurrent, it is always null.
Example: in a request webhook a request variable is available, that can be used to access other elements.
(function () {
let workflow = request.workflow // workflow is fetched
if (!workflow) {
log('workflow missing for request :', request)
return; // exit the package
}
for (let task of workflow.tasks) { // tasks are fetched
// team is fetched, then coordinator person, then organization.
let team_coordinator_organization = task.team.coordinator.organization
log('org :', team_coordinator_organization)
}
}())