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


Required Field Missing: Schedule weekly day of week

Last post 01-18-2010 1:41 AM by Virgina Thomas. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 01-18-2010 1:41 AM

    Required Field Missing: Schedule weekly day of week

    purpose: how to write code to add a recurring gift in Weekly mode. environment: I am trying to communicate to RE API using dot net application code: Dim RE7 As REDotNetAPI.REAPI = New REDotNetAPI.REAPI() If RE7.Init("key", "user id", "password", DatabaseNumber:=50, lAppMode:=Blackbaud.PIA.RE7.BBREAPI.AppMode.amServer) Then Dim oGift As REDotNetAPI.CGift Dim oUtility As IBBUtilityCode Dim oServices As REDotNetAPI.REServices Dim oMG As REDotNetAPI.IBBMatchingGift oServices = New REDotNetAPI.REServices oServices.Init(RE7.SessionContext) oUtility = oServices oGift = New REDotNetAPI.CGift oGift.Init(RE7.SessionContext) With oGift .Fields(Blackbaud.PIA.RE7.BBREAPI.EGiftFields.GIFT_fld_Constit_ID) = 752 .Fields(Blackbaud.PIA.RE7.BBREAPI.EGiftFields.GIFT_fld_Type) = "Recurring Gift" .Fields(Blackbaud.PIA.RE7.BBREAPI.EGiftFields.GIFT_fld_Amount) = 20 .Fields(Blackbaud.PIA.RE7.BBREAPI.EGiftFields.GIFT_fld_Date) = "05/01/2009" .Fields(Blackbaud.PIA.RE7.BBREAPI.EGiftFields.GIFT_fld_Installment_Frequency) = "Weekly" .Fields(Blackbaud.PIA.RE7.BBREAPI.EGiftFields.GIFT_fld_Schedule_Spacing) = 1 .Fields(Blackbaud.PIA.RE7.BBREAPI.EGiftFields.GIFT_fld_Schedule_WeeklyDayOfWeek) = "Monday" .Fields(Blackbaud.PIA.RE7.BBREAPI.EGiftFields.GIFT_fld_Payment_Type) = "Cash" If oUtility.FundUseShortDesc Then .Fields(Blackbaud.PIA.RE7.BBREAPI.EGiftFields.GIFT_fld_Fund) = "SBSF" Else .Fields(Blackbaud.PIA.RE7.BBREAPI.EGiftFields.GIFT_fld_Fund) = oUtility.GetFundDescription(oUtility.GetFundID("SBSF", True)) End If If oGift.MatchingGifts.Count > 0 Then For Each oMG In oGift.MatchingGifts 'This line will default the matching gift to have the same 'field values as the gift given by the constituent oMG.DefaultMGInfoFromGift() 'If you just want to delete the matching gifts use the line below 'oGift.MatchingGifts.Remove oMG Next oMG oMG = Nothing End If End With '' oGift.Validate() oGift.Save() oGift.CloseDown() oGift = Nothing Else ''//Console.WriteLine("Unable to initialize. " & "Error code = " & RE7.SessionContext.ErrorObject.ErrorDescription()) End If --------------------------------------------------------------------------------------------------------------- Exception: In debug mode, At oGift.Save() we are getting following exception COMException was unhandled:-- Required Field Missing: Schedule weekly day of week Please suggest some help asap. Thank you in advance.
Page 1 of 1 (1 items)