none
Programmatically Accessing User-defined Record Types in BCM 2010 RRS feed

  • Question

  • Hello,

    Does anyone know if this is possible? I have created a record type called "Instrument" which is based on the "Business Contact" record type. It has many new fields. Now I'd like to create a new record of type Instrument using VBA.

    Creating a new Business Contact record in VBA is done like this:

    Set newContact = bcmContactsFldr.Items.Add("IPM.Contact.BCM.Contact")

    I tried the following for creating an Instrument-type record, but neither option worked:

    Set newInstrument = bcmContactsFldr.Items.Add("IPM.Contact.BCM.Instrument")

    Set newInstrument = bcmContactsFldr.Items.Add("IPM.Contact.BCM.Contact.Instrument")

    These calls created new records, but they were of type Outlook contact.

    Maybe what I'm looking for doesn't exist as there are no pre-defined types for Instrument. In any case, suggestions are appreciated!

    - Meg

     

    Monday, July 30, 2012 7:59 PM

All replies

  • I don't think you'd be able to do what you want. Customizations that aren't done inside BCM have a way of disappearing after the Outlook data is synched to the BCM database no matter what you do.
     
    In general to create a new MessageClass you need to create a custom form and publish that custom form or to create a form region using a custom MessageClass. A form region in VBA is totally limited as you can't add any business logic without using a COM addin.
     
    A custom form is "not a robust solution" and can have many gotchas. For a lot of information on custom forms see http://www.outlookcode.com/article.aspx?ID=35.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "Meg_T" <=?utf-8?B?TWVnX1Q=?=> wrote in message news:262cf187-3c63-4d6a-b092-9f6bcd6a116c...

    Hello,

    Does anyone know if this is possible? I have created a record type called "Instrument" which is based on the "Business Contact" record type. It has many new fields. Now I'd like to create a new record of type Instrument using VBA.

    Creating a new Business Contact record in VBA is done like this:

    Set newContact = bcmContactsFldr.Items.Add("IPM.Contact.BCM.Contact")

    I tried the following for creating an Instrument-type record, but neither option worked:

    Set newInstrument = bcmContactsFldr.Items.Add("IPM.Contact.BCM.Instrument")

    Set newInstrument = bcmContactsFldr.Items.Add("IPM.Contact.BCM.Contact.Instrument")

    These calls created new records, but they were of type Outlook contact.

    Maybe what I'm looking for doesn't exist as there are no pre-defined types for Instrument. In any case, suggestions are appreciated!

    - Meg


     


    Ken Slovak MVP - Outlook
    Tuesday, July 31, 2012 2:58 PM
    Moderator
  • Hi Ken,

    I did design a new form in BCM by customizing the record type. But that doesn't seem like what you're talking about, and it does not seem to have created a new MessageClass. Nor is this new record listed in the Forms library. I think I am out of luck. 

    Thanks for the reply--no sense trying to do the impossible (or arduous and bug-prone).

    Meg

    Tuesday, July 31, 2012 8:53 PM