Public Sub GetGiftBenefitNote() Dim oGift As CGift Set oGift = New CGift oGift.Init REApplication.SessionContext oGift.Load 1997 'my sample gift Debug.Print oGift.Fields(GIFT_fld_Benefits_Notes) & " <><> " & oGift.Fields(GIFT_fld_Benefits_Include_Notes) oGift.Closedown Set oGift = Nothing End Sub
Given a gift with benefits that look like:
The code sample above would output to the debug window:
"FallBack 5k Pajama Fun Run/Walk registration; include t-shirt valued at $10 <><> -1"
The "-1" indicates that the box "Include notes on receipt" is checked on.
The IBBBenefitsAPI and IBBBenefit object can be used to loop through benefits in order to obtain the Benefit/Unit/Count/total and comments if needed.
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.