Start a new topic

Constit Address Attributes

Is it possible to add a new constit address attribute using the API?  All of the information I have found so far allow the inserting of constituent attributes, but nothing related to the constit address attribute.  Basically, I am trying to create the behavior of the setting in the Profile under Addresses-Phones/Emails:  When a phone/email of the same type exists on a record, Update existing and Move old value to an attribute of my choosing.  This setting is not working in my specific case, because I am processing bounced email addresses, that I am effectively removing from the address in the AfterConstituentOpen sub.  However, I want to keep a record of what that email address was in an address attribute.  It appears as though the setting processes after I delete the email, and therefore it is not recorded in the address attribute automatically.  Any assistance would be appreciated.  Thank you.

Thank you, that makes sense.
Jessica,

The AfterConstituentOpen sub is fired once the constituent has been found or created as new but before any of the data has been changed on it.
That worked like a charm. Thank you. Another curiosity, what is the difference between that AfterConstituentOpen sub and the BeforeConstituentSave sub? They seem to function the same way.
I think you are looking for something like this

[code] With oAddress.Attributes.Add() .Fields(EattributeFields.Attribute_fld_ATTRIBUTETYPES_ID) = "AttributeTypeName" .Fields(EattributeFields.Attribute_fld_VALUE) = "AttributeValue" .Fields(EattributeFields.Attribute_fld_ATTRIBUTEDATE) = Date.Now() .Fields(EattributeFields.Attribute_fld_COMMENTS) = "AttributeComment" End With [/code]
Login or Signup to post a comment