Marty Zigman

Conversations with Marty Zigman

Certified Administrator • ERP • SuiteCloud

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

NetSuite Technical

Tags: , , , ,

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

Marty Zigman LinkedIn

Marty Zigman

Holding three official certifications, Marty is widely recognized as a top NetSuite expert and leads a team of senior professionals at Prolecto Resources, Inc. A former Deloitte & Touche CPA and technology executive with CTO roles, he brings over 35 years of leadership in ERP, CRM, and eCommerce business systems. Contact Marty to engage directly.

BiographyYouTubeLinkedInX (Twitter)

One thought on “Prepping Outlook Contacts to Synchronize with NetSuite’s Outlook 2.0 Client

Leave a Reply

Your email address will not be published. Required fields are marked *