Hi
I have created the following method to return vacant time slots for a service appointment booking project
public BookingProposals GetVacantTimes(Guid serviceId)
{
var ctx = new SkandiaCrmDataContext("CRMCONN");
var svc = ctx.CreateService();
var search = new SearchRequest
{
AppointmentRequest = new AppointmentRequest
{
Direction = SearchDirection.Forward,
ServiceId = serviceId,
Duration = 60,
NumberOfResults = 10,
SearchWindowStart = new CrmDateTime(DateTime.Now.ToUniversalTime().ToString()),
SearchWindowEnd = new CrmDateTime(DateTime.Now.AddDays(7).ToUniversalTime().ToString()),
UserTimeZoneCode = 1,
}
};
var response = (SearchResponse)svc.Execute(search);
return new BookingProposals { Proposals = response.SearchResults.Proposals.Select(o => new BookingProposal { Start = o.Start.UniversalTime, End = o.End.UniversalTime }) };
}
But the Execute results in a SoapException
It is using my Administrator credentials, so i dont think it is a problem with authentication