Mitdasein in the experience of encountering the customer in our common having been cast into the opening of beyng

Thursday, May 25, 2006

Create a BCM Phone Log through Outlook


' CreatePhoneLog.vbs
' Create an Account, create a Phone Log
' and set the Account as the Log's parent
set oOL = CreateObject("Outlook.Application")
set oNS = oOL.GetNamespace("MAPI")
set oBCMFolder = oNS.Folders("Business Contact Manager")
set oBCMAccountsFolder = oBCMFolder.Folders("Accounts")
set oAccountsFolderItems = oBCMAccountsFolder.Items
set oAccount = oAccountsFolderItems.Add("IPM.Contact.BCM.Account")
oAccount.FullName = "Wu Ming"
oAccount.Save()

' create Phone Log
set oBCMActivitiesFolder = oBCMFolder.Folders("Business History")
set oActivitiesFolderItems = oBCMActivitiesFolder.Items
set oPhoneLog = oActivitiesFolderItems.Add("IPM.Activity.BCM.PhoneLog")

' set some properties
oPhoneLog.UserProperties("Type") = 15
oPhoneLog.UserProperties("Parent Entity EntryID") = oAccount.EntryID
oPhoneLog.Subject = "Chat with Luther"
oPhoneLog.UserProperties("Start Time") = "5/25/2006 8:49:28 AM"
oPhoneLog.Duration = 3
oPhoneLog.Save()

Sadly the Duration won't show on the form unless you set it on the form (the same is true when you import a Phone Log) but the Duration will show in the Business History folder view

Tuesday, May 23, 2006

Office 2007 Beta 2 released

Get it.

Monday, May 15, 2006

What to expect

Product Guide to BCM v3 and the top ten reasons to upgrade.

Monday, May 08, 2006

Set an Account property through VBS

Here's a short script that creates an Account and sets a pull-down property in BCM v2. Have Outlook/BCM running in the profile you want to use.


' SetStatus.vbs
' Create BCM v2 Account and set "Business Status" property to "Current"

set oOL = CreateObject("Outlook.Application")
set oNS = oOL.GetNamespace("MAPI")
set oBCMFolder = oNS.Folders("Business Contact Manager")
set oBCMAccountsFolder = oBCMFolder.Folders("Accounts")
set oItems = oBCMAccountsFolder.Items
set oAccount = oItems.Add("IPM.Contact.BCM.Account")
oAccount.FullName = "Wu Ming"
set oProperties = oAccount.ItemProperties
oProperties("Business Status").Value = "Current"
oAccount.Save()


In BCM v3 this property has changed and is now a checkbox.


' Create Account and set Active ("Status") property to false

set oOL = CreateObject("Outlook.Application")
set oNS = oOL.GetNamespace("MAPI")
set oBCMFolder = oNS.Folders("Business Contact Manager")
set oBCMAccountsFolder = oBCMFolder.Folders("Accounts")
set oItems = oBCMAccountsFolder.Items
set oAccount = oItems.Add("IPM.Contact.BCM.Account")
oAccount.FullName = "Wu Ming"
set oProperties = oAccount.ItemProperties
oProperties("Active").Value = 0
oAccount.Save()

Tuesday, May 02, 2006

A Port For BCM

Typically SQL Server installs create a sql instance and setup an NT service that listens for connections on a UDP port. A bug in the rcp port mapper was the cause of a huge worm attack on the internet a few years. It exploited the fact that sql listened on that UDP port on millions of machines. When a sqlserver.exe instance service starts up, it picks a random, unused, TCP port for connections. It then tells the sql listener what TCP port it is using.

When a typical client machine tries to connect a sql instance on a server, the sql client software calls the sql listener UDP port and requests connection to a sql instance. The sql listener then checks its table of instances that have published to it. If it finds a match, it looks up the TCP post number of the instance, and then returns the TCP port number to the client. The client then connects through that TCP port directly to the server.

When BCM installs MSDE it specifies a fixed TCP port, 56183, for the instance, and that information is kept a secret from the sql UDP listener. The only way to connect a BCM client to a BCM database on the server is to use TCP port 56183.

By the way, the port number is different for BCM v3 Beta; 5356. It complicates things a bit, but it allows BCM v2 (MSDE) and BCM v3 (Sql Xpress) databases to exist on the same machine.

Therefore, if you move the BCM database from the original MSDE instance to a SQL Server instance, BCM clients will only connect to the database if the SQL Server instance is using TCP port 56183.