locked
Creating Service Appointment With conflicts handling RRS feed

  • Question

  • 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

    Monday, August 8, 2016 12:43 AM

Answers

All replies