The button map it drive it control will bring forward a screen when clicked to get directions between two locations. Directions for map it drive it can be found here.
To change the default code, click the ellipses (...) button in the properties panel, change the code and click save.
The default code for the button is
'--------------------------------------------------
' Get the form the user is working on
'--------------------------------------------------
Dim EntityForm as Durkin.Common.Classes.frmSubEntityItemEditDurkin
EntityForm = directCast(SubEntityForm, Durkin.Common.Classes.frmSubEntityItemEditDurkin)
'--------------------------------------------------
' Get the STARTING point contact
'--------------------------------------------------
'--------------------------------------------------
' My record
'--------------------------------------------------
'Dim StartContact as Act.Framework.Contacts.Contact = HostApplication.ActFramework.Contacts.GetMyRecord()
'--------------------------------------------------
' First contact atached to the record
'--------------------------------------------------
Dim StartContact as Act.Framework.Contacts.Contact = EntityForm.GetEntityItem().GetContacts(nothing)(0)
'--------------------------------------------------
' Get the FROM addresses from the STARTING CONTACT
'--------------------------------------------------
Dim fAddress As String = Contacts.GetContactFieldDescriptorByANY(HostFramework, "Address 1").GetValue(StartContact )
Dim fCity As String = Contacts.GetContactFieldDescriptorByANY(HostFramework, "TBL_CONTACT.BUSINESS_CITY").GetValue(StartContact )
Dim fState As String = Contacts.GetContactFieldDescriptorByANY(HostFramework, "TBL_CONTACT.BUSINESS_STATE").GetValue(StartContact )
Dim fPostal As String =Contacts.GetContactFieldDescriptorByANY(HostFramework, "TBL_CONTACT.BUSINESS_POSTALCODE").GetValue(StartContact )
Dim fCountry As String = Contacts.GetContactFieldDescriptorByANY(HostFramework, "TBL_CONTACT.BUSINESS_COUNTRYNAME").GetValue(StartContact )
'--------------------------------------------------
' Get the DESTINATION addresses from the current record
'--------------------------------------------------
Dim dAddress As String = CustomSubEntity.GetFieldDescriptorByANY("Destination Address", EntityForm.GetEntityManager()).GetValue(EntityForm.GetEntityItem())
Dim dCity As String = CustomSubEntity.GetFieldDescriptorByANY("Destination City", EntityForm.GetEntityManager()).GetValue(EntityForm.GetEntityItem())
Dim dState As String = CustomSubEntity.GetFieldDescriptorByANY("Destination State", EntityForm.GetEntityManager()).GetValue(EntityForm.GetEntityItem())
Dim dPostal As String = CustomSubEntity.GetFieldDescriptorByANY("Destination Postal", EntityForm.GetEntityManager()).GetValue(EntityForm.GetEntityItem())
Dim dCountry As String = CustomSubEntity.GetFieldDescriptorByANY("Destination Country", EntityForm.GetEntityManager()).GetValue(EntityForm.GetEntityItem())
'--------------------------------------------------
' Send the information to Google Maps
'--------------------------------------------------
Dim MapIt As New Durkin.Common.Views.frmMapit(fAddress , fCity , fState , fPostal , fCountry , dAddress , dCity , dState , dPostal , dCountry )
MapIt.Show()