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

0 Comments:

Post a Comment

<< Home