About the Author

Voice Enabled NetSuite

Testimonials

“Recently I met with Marty over dinner to discuss our respective businesses. I was quite impressed with how quickly Marty grasped the essence of the business proposition. He zeroed in on where value lay and where the "gotchas" would be. In my experience the ability to diagnose business situations this quickly, with very little misfire, is rare. I would recognize Marty as a business provider without exception.” January 21, 2010

Mike Gillette, CEO at Horizon Hobby

Prepping Outlook Contacts to Synchronize with NetSuite’s Outlook 2.0 Client

In our previous post, Synching Contacts in NetSuite’s Outlook 2.0 , we recognized that we would need to clean up our contacts to get them to synchronize with NetSuite’s Outlook 2.0 client. We see this as pretty typical in CRM implementations. In this case, we wanted to perform two operations:

  1. Ensure all US countries in the Business Address where formatted as “United States of America”.
  2. Mark all of the contacts as Private so they will be marked as Private in NetSuite.

To do this, we wrote a basic Outlook 2003 Macro to modify all contacts meeting our criteria. Once we were satisfied with the updates, we synchronized the contacts to NetSuite without hitch.

It appears that Outlook Events are still synchronizing with NetSuite even though we believe we shut off that option. It also looks like it is creating duplicate events based on a contact’s birthday and anniversary. But before we conclude that is the case, we need to do some more investigative work.

Here is the Outlook Macro:

Sub UpdateBusinessContactsForNetSuite()
	Dim myOlApp As Application
	Dim myNameSpace As nameSpace
	Dim myFolder As MAPIFolder
	Dim myItems As Items
	Dim myItem As Object
	Dim myContactCount As Integer
	Dim myContactPrivate As Integer

	Set myOlApp = CreateObject("Outlook.Application")
	Set myNameSpace = myOlApp.GetNamespace("MAPI")

	Set myFolder = myNameSpace.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderContacts)
	Set myItems = myFolder.Items

	'spin through the list of contacts and only manipulate the ones that have a business adddress
	For Each myItem In myItems
		'only operate on contact items with a business address
		If TypeName(myItem) = "ContactItem" Then
			If Len(myItem.BusinessAddress) > 0 Then
				Select Case myItem.BusinessAddressCountry
				Case "United States", "USA", ""
					myItem.BusinessAddressCountry = "United States of America"
					myItem.Save
					myContactCount = myContactCount + 1
				End Select
			End If

			'check privacy flag and update to private
			If myItem.Sensitivity <> OlSensitivity.olPrivate Then
				myItem.Sensitivity = OlSensitivity.olPrivate
				myContactPrivate = myContactPrivate + 1
				myItem.Save
			End If
		End If
	Next

	MsgBox "Count of Contacts with Updated Country Business Address is " & myContactCount
	MsgBox "Count of Contacts Updated to Private is " & myContactPrivate
End Sub

1 comment to Prepping Outlook Contacts to Synchronize with NetSuite’s Outlook 2.0 Client

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>