Public Sub GivingHierarchyTest() Dim oCampaign As CCampaign Dim oIBBCampaign As IBBCampaign Dim oMainGivingHierarchy As CGivingHierarchy Set oCampaign = New CCampaign With oCampaign .Init RE7.SessionContext .Fields(CAMPAIGN_fld_CampaignID) = "GIVINGTEST" .Fields(CAMPAIGN_fld_DESCRIPTION) = "Giving Hierarchy Test" Set oIBBCampaign = oCampaign Set oMainGivingHierarchy = oIBBCampaign.GivingHierarchy With oMainGivingHierarchy.GivingHierarchies.Add .Fields(GivingHierarchy_fld_FundRecordId) = 7 'Botanical Garden Fund With .GivingHierarchies.Add .Fields(GivingHierarchy_fld_FundRecordId) = 30 '2006 Annual Fund End With End With With oMainGivingHierarchy.GivingHierarchies.Add .Fields(GivingHierarchy_fld_FundRecordId) = 18 'Camp Kids Scholarship End With Set oIBBCampaign = Nothing Set oMainGivingHierarchy = Nothing .Save .CloseDown End With Set oCampaign = Nothing End SubNote: The above code will only work in The Raiser's Edge Enterprise edition.
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. Our Customer Support can help explain the functionality of a particular procedure, but we will not modify, or assist you with modifying, these examples to provide additional functionality. If you are interested in learning more about the VBA and API modules, contact your account manager.