This topic contains 0 replies, has 0 voices, and was last updated by Nick Foster 9 years, 1 month ago.

  • Author
    Posts
  • #6848

    Nick Foster

    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.

You must be logged in to reply to this topic.