I’m running an advanced search for timesheets but in order to map back to our other systems I need to return the external id of the employee.
The current C# function is like this
Code:
public List FindTimesheetsByLastModified(DateTime lastModified) {
TimeSheetSearchAdvanced tsa = new TimeSheetSearchAdvanced() {
criteria = new TimeSheetSearch() {
timeEntryJoin = new TimeEntrySearchBasic() {
lastModified = new SearchDateField() {
@operator = SearchDateFieldOperator.after,
operatorSpecified = true,
searchValue = lastModified,
searchValueSpecified = true
}
}
}
};
SearchResult result = _service.search(tsa);
if (!result.status.isSuccess) {
throw new ApplicationException(“Timesheet search failed”, EnumerateErrorsToException(result.status.statusDetail));
}
List records = result.recordList.Select(t => (TimeSheet)t).ToList();
return records;
}
Can anyone provide an example of how I would specify which columns I want to return? I would like all the timesheet properties and a better selection of the employee details (externalId, firstname, surname)
Thanks,
Nick
This is a cached copy. Click here to see the original post.