Private Sub RaisersEdgeRecord_BeforeSave(oRecord As Object, bcancel As Boolean)

   'To have program work add an action with an
   'Interest Generated? attribute in the sample db

   Dim oAction As CAction
   Set oAction = oRecord 

   Dim lAttributeID As Long
   Dim oAttribute As IBBAttribute
   Set ReService = New REServices
   ReService.Init REApplication.SessionContext

   Dim moAttributeTypeServer As CAttributeTypeServer
   Set moAttributeTypeServer = ReService.CreateServiceObject(bbsoAttributeTypeServer)
   moAttributeTypeServer.Init REApplication.SessionContext
   lAttributeID = moAttributeTypeServer.GetAttributeTypeID("Interest Generated?", bbAttributeRecordType_ACTION) ' assuming you know the specific attribute category

   'Go through each attribute in the action to find specific type
   For Each oAttribute In oAction.Attributes
       'If the attribute is Interest Generated
       If lAttributeID = oAttribute.Fields(Attribute_fld_ATTRIBUTETYPES_ID) Then
           'Attribute Description
           Debug.Print oAttribute.Fields(Attribute_fld_VALUE)
       End If

   Next oAttribute

   Set moAttributeTypeServer = Nothing 
   End Sub

Disclaimer: We provide programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes you are familiar with Microsoft Visual Basic and the tools used to create and debug procedures. Blackbaud Customer Support may help explain the functionality of a particular procedure, but we will not modify, or assist you with modifying, these examples to provide additional functionality.