S
sasqlacz
On incomming call i search bussines contact connected with phone number and I
display searched contact. Next I create new phone log connected with this
business contact save it and display to user. The problem is that phone log
form displays with most of field read only. Second issue is that form han an
icon like journal item but all form looks like phone log form BCM.
Interesting thing is that saved phone log is properly displayed in 'History'
tab on business contact form.
I use this code to create new phone log item.
private void AddPhoneLogEntryForBcmContact(MSOutlook.ContactItem contact)
{
MSOutlook.MAPIFolder bcmFolder =
this.Application.GetNamespace("MAPI").Folders["Business Contact Manager"];
MSOutlook.MAPIFolder historyFolder =
bcmFolder.Folders["Communication history"];
MSOutlook.JournalItem journalItem =
(MSOutlook.JournalItem)historyFolder.Items.Add("IPM.Activity.BCM.PhoneCall");
journalItem.Type = "Phone Log";
journalItem.Subject = "Incoming call";
if (null == journalItem.UserProperties["Parent Entity EntryID"])
{
MSOutlook.UserProperty userProp =
journalItem.UserProperties.Add("Parent Entity EntryID",
MSOutlook.OlUserPropertyType.olText, false, false);
userProp.Value = contact.EntryID;
}
journalItem.Save();
journalItem.Display(false);
}
I use VS2005 VSTO Add-in, Office 2007, BCM version 3.00.5828.
Any help would be apriciated.
display searched contact. Next I create new phone log connected with this
business contact save it and display to user. The problem is that phone log
form displays with most of field read only. Second issue is that form han an
icon like journal item but all form looks like phone log form BCM.
Interesting thing is that saved phone log is properly displayed in 'History'
tab on business contact form.
I use this code to create new phone log item.
private void AddPhoneLogEntryForBcmContact(MSOutlook.ContactItem contact)
{
MSOutlook.MAPIFolder bcmFolder =
this.Application.GetNamespace("MAPI").Folders["Business Contact Manager"];
MSOutlook.MAPIFolder historyFolder =
bcmFolder.Folders["Communication history"];
MSOutlook.JournalItem journalItem =
(MSOutlook.JournalItem)historyFolder.Items.Add("IPM.Activity.BCM.PhoneCall");
journalItem.Type = "Phone Log";
journalItem.Subject = "Incoming call";
if (null == journalItem.UserProperties["Parent Entity EntryID"])
{
MSOutlook.UserProperty userProp =
journalItem.UserProperties.Add("Parent Entity EntryID",
MSOutlook.OlUserPropertyType.olText, false, false);
userProp.Value = contact.EntryID;
}
journalItem.Save();
journalItem.Display(false);
}
I use VS2005 VSTO Add-in, Office 2007, BCM version 3.00.5828.
Any help would be apriciated.