public void Handler()
        {
            InboundRequest inboundRequest = null;
            ToaRequestResult inboundResult = null;
            int? aid = null;
            WorkOrderModel workOrderModel = null;
            try
            {
                _log.Notice("Starting WorkOrderSave Handler."); 
                object wotype = EventHandlerServices.GetEventHandlerService().getFieldFromWorOrderRecord(_workOrderRecord,"WO_Type");
                object overrideRequest = EventHandlerServices.GetEventHandlerService().getFieldFromWorOrderRecord(_workOrderRecord, "Override_Request");
                object timeSlot = EventHandlerServices.GetEventHandlerService().getFieldFromWorOrderRecord(_workOrderRecord, "WO_Time_Slot");
                object wodate = EventHandlerServices.GetEventHandlerService().getFieldFromWorOrderRecord(_workOrderRecord, "WO_Date");
                object resolutionDue = EventHandlerServices.GetEventHandlerService().getFieldFromWorOrderRecord(_workOrderRecord, "Resolution_Due");
 
                if (null == wotype)
                {                    
                    return;
                }

                if (overrideRequest != null)
                {
                    if (timeSlot == null || wodate == null)
                    {
                            return;
                    }
                }
                else
                {
                    if(timeSlot == null || wodate == null)
                    {
                        if (resolutionDue == null)
                        {
                            return;
                        }
                    }
                }

                _log.Notice("Converting from RecordContext to WorkOrder Model started");
                workOrderModel = EventHandlerServices.GetEventHandlerService().GetWorkOrderModel(_recordContext); 
                _log.Notice("Convertion from RecordContext to WorkOrder Model completed");

                //Appointments 'key' fields are set in the constuctor of below object
                var activitySettings = new ActivitySettingsModel();
                //Inventory 'key' fields are set in the constuctor of below object
                var inventorySettings = new InventorySettingsModel();

                _log.Notice("Initialize InboundRequest");
                inboundRequest = new InboundRequest(new List<IToaModel>() { workOrderModel });
                inboundRequest.PropertiesMode = Client.Common.PropertiesMode.Replace;
                inboundRequest.AllowChangeDate = Client.Common.AllowChangeDate.Yes;
                inboundRequest.ActivitySettings = activitySettings;
                inboundRequest.InventorySettings = inventorySettings;
                _log.Notice("Invoking TOA Server using Inbound API Started");
                inboundResult = InboundService.GetService().BeginSyncRequest(inboundRequest);

                if (inboundResult != null)
                {
                    _log.Notice("Invoking TOA Server using Inbound API Completed");
                    ToaExceptionManager manager = new ToaExceptionManager();
                    _log.Notice("Processing Inbound API Response Result");
                    aid = manager.ProcessInboundResult(inboundResult);
                    _log.Notice("Completed Processing Inbound API Response Result");
                    if (aid == null)
                    {
                        _cancelEventArgs.Cancel = true;
                        return;
                    }
                }
                else
                {
                    foreach (IGenericField field in _workOrderRecord.GenericFields)
                    {
                        if (field.Name.Equals("WO_Status"))
                        {
                            TextInfo textInfo = new CultureInfo("en-US", false).TextInfo;
                            field.DataValue.Value = textInfo.ToTitleCase(ToaStringsUtil.GetString(Client.Common.ActivityStatus.NotCreated));
                            break;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                _log.Error(ex.Message,ex.StackTrace);
                MessageBox.Show(ToaExceptionMessages.UnexpectedError, ToaExceptionMessages.TitleError, 
                    MessageBoxButton.OK, MessageBoxImage.Error);
            }

            try
            {
                _log.Notice("Updating WorkOrder Record.");
                workOrderModel.TOA_AID = (aid != null) ? aid : 0;
                UpdateWorkOrderRecord(inboundResult, workOrderModel);
                _log.Notice("WorkOrder Record Updated.");
                _log.Notice("Exiting WorkOrderSave Handler.");

            }
            catch (Exception ex)
            {
                _log.Error(ex.Message, ex.StackTrace);
                MessageBox.Show(ToaExceptionMessages.UnexpectedError, ToaExceptionMessages.TitleError,
                    MessageBoxButton.OK, MessageBoxImage.Error);

            }
            
        }
 /// <summary>
 /// Callback method that will be invoked after the work order area request is successful.
 /// </summary>
 /// <param name="result">TOARequestResult object</param>
 public void WorkOrderAreaCallback(ToaRequestResult result)
 {
     _log.Notice("Inside Callback Method WorkOrderAreaCallback");
     CapacityModel model = (CapacityModel)result.DataModels[0];
     WorkOrderAreaItems = new ObservableCollection<string>(model.Location);
     ToaExceptionManager manager = new ToaExceptionManager();
     manager.ProcessCapacityServiceResult(result);
 }