Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

Creating Service Appointment With conflicts handling

$
0
0

Hi everyone,
I have a critical problem with service activity (appointment). How can I check if resource (Equipment) is free before I can create new service appointment. With my current code, system goes for creation of service appointments regardless of Equipment is busy or free.

var newServiceAppointment = new ServiceAppointment
{
ServiceId = new EntityReference(CRMHelper.Service.EntityLogicalName, new Guid(serviceId)),
Location = branchTitle,
Resources = new ActivityParty[] { equipmentPartyResource },
ScheduledStart = Convert.ToDateTime(startTime),
ScheduledEnd = Convert.ToDateTime(endTime),
ScheduledDurationMinutes = scheduledDurationMinutes,
Customers = new ActivityParty[] { accountPartyResource }
};

I tried to search many topics but I didn't found how to handle this problem. Have any one faced this problem before.

Thanks in advance.


Wa'el Mohsen


Viewing all articles
Browse latest Browse all 8223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>