Hi. I want to create a service activity for my resource man(services).I write some code for it and use search request. as seen below. but I don't know why "SearchResults" does not retrieve any records.
SearchRequest search = new SearchRequest
{
AppointmentRequest = appointmentReq
};
SearchResponse searched = (SearchResponse) ServiceProxy.Execute(search);
AppointmentProposal _best_app_proposal = null;
if (searched.SearchResults.Proposals.Length > 0)
{
foreach (AppointmentProposal _app_proposal in searched.SearchResults.Proposals)
{
if (_app_proposal.Start.Value >=
new DateTime(_app_proposal.Start.Value.Year, _app_proposal.Start.Value.Month,
_app_proposal.Start.Value.Day, _AnchorOffset/60,
_AnchorOffset%60, 0).ToUniversalTime())
{
_best_app_proposal = _app_proposal;
break;
}
}