Introduction
Microsoft Dynamics GP is the leading business management software solution for mid-market organizations, and provides robust functionality for accounting, financial management, distribution, purchasing, inventory control, manufacturing, project accounting, payroll and human resources. However, resource management and logistics as well as service dispatch and scheduling are not readily available in Dynamics GP, never mind a natural user interface for visually planning and scheduling resources. PureLogic selected DBI Technologies' Solution Schedule .NET and Studio Controls .NET components to provide this essential functionality.
Background
PureLogic, a Microsoft Partner with a long record of accomplishment developing and delivering custom and packaged solutions for the Microsoft Dynamics GP platform, was challenged to meet the needs of the service industry - and specifically a field service centric, visual planning and scheduling solution. After much debate and research, PureLogic chose to embed their eService/360 product into Dynamics GP using the same Dexterity development system used by Microsoft to create Dynamics GP and along with DBI Technologies' Solution Schedule .NET and Studio Controls .NET components for the essential natural user interface and visual scheduling functionality.
How It Was Done
"We knew the type of interface and functionality we wanted for our customers…", said Jeffery Southworth, Director of Product Development at PureLogic. "… and were pleased that Microsoft’s Visual Studio Tools (VST) for Dynamics GP was available to help us take full advantage of DBI’s .NET components. Not only did DBI have exactly what we needed in the way of Resource Scheduling and Dispatch, we also found they had a comprehensive collection of data, presentation and general UI design controls, as well. After evaluating and stress testing their commercial controls, along with a few phone calls back and forth, we started to incorporate DBI's Solution Schedule .NET and Studio Controls .NET components into our project."
"I was very pleased with how fast we were able to implement these controls." continued Jeffery, "And we took full advantage of DBI's custom component services, which really jump-started our development process. Their consulting team really knew their stuff, and why wouldn’t they? They’ve been building commercial scheduling and UI / Data software for years. Within three weeks of committing to our approach, we had a fully functional drag and drop Service Dispatch and Scheduling application including bidirectional integration with our Service Order Processing module. We were amazed at how fast we were able to satisfy this complex requirement and still keep it intuitive and easy to use for our customers."
"DBI Technologies' dbiList, dbiDate, and dbiSchedule controls offer an efficient way to present scheduled and unscheduled service orders to the dispatcher for sorting, selecting, scheduling, and unscheduling.
To schedule an order, the dispatcher uses the DBI Calendar control to select the schedule date, and then drags the unscheduled order from the dbiList to an available start time for an eligible Team Resource. The dispatcher can then increase or decrease the time period allocated to the order by simply resizing the timebar with the mouse. Using Microsoft VST for Dynamics GP, we were able to easily include the following code in the AfterTimeBarDrop()
event of the dbiSchedule
control to update the Team Resource, Arrival Date/Time, and Departure Date/Time on the underlying service order record in the Dynamics GP database."
//
Private Sub DbiSchedule1_AfterTimeBarDrop(sender As System.Object, _
e As Dbi.WinControl.Schedule.AfterTimeBarDropEventArgs) Handles DbiSchedule1.AfterTimeBarDrop
SmServiceTrxHdrOpenTable.Key = 1
SmServiceTrxHdrOpenTable.SmDocumentNumber.Value = e.TimeBarItem.Tag
iTableError1 = SmServiceTrxHdrOpenTable.Change() If iTableError1 = TableError.NoError Then
EService360.Tables.SmServiceTrxHdrOpen.SmTeamItemNumber.Value = _
e.ScheduleItem.Tag EService360.Tables.SmServiceTrxHdrOpen.SmScheduledArrivalDate.Value = e.TimeBarItem.Start
EService360.Tables.SmServiceTrxHdrOpen.SmScheduledArrivalTime.Value = e.TimeBarItem.Start
EService360.Tables.SmServiceTrxHdrOpen.SmScheduledDepartureDate.Value = e.TimeBarItem.End
EService360.Tables.SmServiceTrxHdrOpen.SmScheduledDepartureTime.Value = e.TimeBarItem.End
iTableError1 = EService360.Tables.SmServiceTrxHdrOpen.Save()
If iTableError1 = TableError.NoError Then
Me.lstScheduledOrders.Items.Add(Me.lstUnscheduledOrders.SelectedItems(0).Text)
Me.lstUnscheduledOrders.Items.Remove_
(Me.lstUnscheduledOrders.SelectedItems(0)) Select Case Me.lstScheduledOrders.SortColumn
Case 0 Me.lstScheduledOrders.Sort(0)
Case 1 Me.lstScheduledOrders.Sort(1)
Case 2 Me.lstScheduledOrders.Sort(2)
End Select
sTimeBarTip = e.TimeBarItem.Text
Else
Dynamics.Forms.SyVisualStudioHelper.Functions.DexError.Invoke_
("Error " + Str(iTableError1) +
": Unable to save record in SM Service Trx Header Open table.")
Exit Sub
End If
Else
Dynamics.Forms.SyVisualStudioHelper.Functions.DexError.Invoke_
("Error " + Str(iTableError1) +
": Unable to lock record in SM Service Trx Header Open table.")
Exit Sub
End If
End Sub
//
//
var i = 0;
...
"To unschedule an order, the dispatcher simply selects an order from the Scheduled Service Order dbiList and drags it into the Unscheduled Service Order dbiList. We were then able to include the following code in the lstUnscheduledOrders_DropList()
event of the dbiList to remove the timebar from the dbiSchedule as well as the Team Resource, Arrival Date/Time and Departure Date/Time from the underlying service order in the Dynamics GP database."
//
EService360.Tables.SmServiceTrxHdrOpen.SmTeamItemNumber.Clear() EService360.Tables.SmServiceTrxHdrOpen.SmScheduledArrivalDate.Clear()
EService360.Tables.SmServiceTrxHdrOpen.SmScheduledArrivalTime.Clear()
EService360.Tables.SmServiceTrxHdrOpen.SmScheduledDepartureDate.Clear()
EService360.Tables.SmServiceTrxHdrOpen.SmScheduledDepartureTime.Clear()
iTableError1 = EService360.Tables.SmServiceTrxHdrOpen.Save()
If iTableError1 = TableError.NoError Then
Me.lstUnscheduledOrders.Items.Add(Me.lstScheduledOrders.SelectedItems(0).Text)
Me.lstUnscheduledOrders.Tag = Me.lstScheduledOrders.Tag
Select Case Me.lstUnscheduledOrders.SortColumn
Case 0 Me.lstUnscheduledOrders.Sort(0)
Case 1 Me.lstUnscheduledOrders.Sort(1)
Case 2 Me.lstUnscheduledOrders.Sort(2)
End Select
For Each oNodeItem In Me.lstUnscheduledOrders.Items
If oNodeItem.GetCellText(0) = Me.lstScheduledOrders.Tag Then
oNodeItem.Selected = True
Me.lstUnscheduledOrders.EnsureVisible_(oNodeItem) Exit For
End If
Next
Dim bExitAll As Boolean
For iTeamItem As Integer = 0 To Me.DbiSchedule1.Items.Count - 1
For iTimeBarItem As Integer = 0 To _
Me.DbiSchedule1.Items(iTeamItem).TimeBars.Count - 1
If Me.DbiSchedule1.Items(iTeamItem).TimeBars_
(iTimeBarItem).Tag = Me.lstUnscheduledOrders.Tag Then
Me.DbiSchedule1.Items(iTeamItem).TimeBars(iTimeBarItem).End =
Me.DbiSchedule1.Items(iTeamItem).TimeBars_
(iTimeBarItem).Start Me.DbiSchedule1.Items(iTeamItem).TimeBars.Remove_
(Me.DbiSchedule1.Items(iTeamItem).TimeBars(iTimeBarItem))
Me.DbiScheduleObject1.Start = Me.DbiDate1.Date.AddHours_
(Me.cboScheduleStartTime.SelectedIndex)
Me.DbiScheduleObject1.End = Me.DbiDate1.Date.AddDays(1)
bExitAll = True
Exit For
End If
Next
If bExitAll = True Then
Exit For
End If
Next
Me.lstScheduledOrders.Items.Remove_
(Me.lstScheduledOrders.SelectedItems(0))
For iTimeBarSelected As Integer = 0 To DbiSchedule1.SelectedTimeBars.Count - 1
DbiSchedule1.SelectedTimeBars(iTimeBarSelected).IsSelected = False
Next
//
//
"And finally, to create a seamless bidirectional integration between the Service Dispatch and Scheduling application and our Service Order Processing module, we added the following code to the TimeBarDoubleClick()
event of the dbiSchedule control which automatically opens the Service Transaction Entry window and displays the specified Service Order below."
//
Private Sub DbiSchedule1_TimeBarDoubleClick(sender As System.Object, _
e As Dbi.WinControl.Schedule.TimeBarDoubleClickEventArgs) _
Handles DbiSchedule1.TimeBarDoubleClick
If cboBranch.SelectedIndex >= 0 Then
If EService360.Forms.SmServiceTrxEntry.SmServiceTrxEntry.SmBranchId.Value = _
cboBranch.SelectedItem And
EService360.Forms.SmServiceTrxEntry.SmServiceTrxEntry.SmDocumentType.Value = 2 And
EService360.Forms.SmServiceTrxEntry.SmServiceTrxEntry.SmDocumentNumber.Value = _
e.TimeBarItem.Tag And
EService360.Forms.SmServiceTrxEntry.SmServiceTrxEntry.DisplayExistingRecord.Value = _
True Then EService360.Forms.SmServiceTrxEntry.Open() Else
EService360.Forms.SmServiceTrxEntry.SmServiceTrxEntry.ClearButton.RunValidate()
EService360.Forms.SmServiceTrxEntry.SmServiceTrxEntry.SmBranchId.Value = _
cboBranch.SelectedItem
EService360.Forms.SmServiceTrxEntry.SmServiceTrxEntry.SmBranchId.RunValidate()
EService360.Forms.SmServiceTrxEntry.SmServiceTrxEntry.SmDocumentType.Value = 2
EService360.Forms.SmServiceTrxEntry.SmServiceTrxEntry.SmDocumentNumber.Value = _
e.TimeBarItem.Tag
EService360.Forms.SmServiceTrxEntry.SmServiceTrxEntry.DisplayExistingRecord.RunValidate()
EService360.Forms.SmServiceTrxEntry.SmServiceTrxEntry.SmCustomerName.Focus()
EService360.Forms.SmServiceTrxEntry.Open() End If
End If
End Sub
//
//
And vice versa, when the user clicks the above highlighted button on the Service Transaction Entry window in Dynamics GP, trigger logic automatically opens the Service Dispatch and Scheduling window and highlights the selected Service Order.
About the Authors