Welcome to Forums Sign in | Join | Help | Forums
in Search


COMException was unhandled -- Required Field Missing: Fund

Last post 01-13-2010 9:11 AM by David Zeidman. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 01-13-2010 7:10 AM

    COMException was unhandled -- Required Field Missing: Fund

    Hi, I am new to Blackbaud and i am trying to call Blackbaud methods from Dot net windows application. when i debug control flow firing Exception at following line:-- ogift.Save() Please help me, i am trying to solve this from past 2days.. thanks in advance. Code:----------- Public Sub Addgift(ByVal orecord As IBBDataObject) Dim RE7 As REDotNetAPI.REAPI = New REDotNetAPI.REAPI() If RE7.Init("SRNUM", "UNAME", "PWD", DatabaseNumber:=50, lAppMode:=Blackbaud.PIA.RE7.BBREAPI.AppMode.amServer) Then Dim oConstit As REDotNetAPI.CRecord oConstit = orecord Dim ogift As REDotNetAPI.CGift ogift = New REDotNetAPI.CGift ogift.Init(RE7.SessionContext) With ogift .Fields(Blackbaud.PIA.RE7.BBREAPI.EGiftFields.GIFT_fld_Amount) = 5000 .Fields(Blackbaud.PIA.RE7.BBREAPI.EGiftFields.GIFT_fld_Constit_ID) = "260" .Fields(Blackbaud.PIA.RE7.BBREAPI.EGiftFields.GIFT_fld_Fund) = "CAMP" .Fields(Blackbaud.PIA.RE7.BBREAPI.EGiftFields.GIFT_fld_Date) = "5/1/02" .Fields(Blackbaud.PIA.RE7.BBREAPI.EGiftFields.GIFT_fld_Type) = "Cash" .Fields(Blackbaud.PIA.RE7.BBREAPI.EGiftFields.GIFT_fld_EFT_Id) = "2003" End With ogift.Save() ogift.CloseDown() ogift = Nothing Else ''//Console.WriteLine("Unable to initialize. " & "Error code = " & RE7.SessionContext.ErrorObject.ErrorDescription()) End If
  • 01-13-2010 9:11 AM In reply to

    • David Zeidman
    • Top 25 Contributor
    • User Since: 2002
    • Posts 326
    • Organization: Zeidman Development
    • Products:  Blackbaud Direct Marketing, Blackbaud Enterprise CRM, The Information Edge, The Raiser's Edge

    Re: COMException was unhandled -- Required Field Missing: Fund

    It looks like you are setting the fund value here so that is probably not the problem. Check on the constituent to see if they have a company that matches gifts. This happened to me once. Even though I was explicity setting the fund I got the same error. When the matched gift is created it is created without a fund so you have to add that fund to the matched gift. Alternatively explicitly say that you do not want to create a matched gift.

    See my blog posting for more details:

    http://www.re-decoded.com/2007/12/fund-missing-found-in-an-unexpected-place/

    David

    David Zeidman
    Zeidman Development
    http://www.zeidman.info

    Check out my RE API blog
    http://www.re-decoded.com
Page 1 of 1 (2 items)