Start a new topic

Save Tribute Letter

Sorry for the questions today, this is driving me nuts!

I am trying to set the acknowledgee tribute letter to Tribute Card if it is blank.  I get all the right messages that indicate that the letter has changed, but after the import they are still blank!

' If a tribute was edited then check for the letter
If Import.Fields.GetByName("TributeID").Value "" Then
        Dim oRec As New CRecord
        Dim oTribute As CTribute
        Dim oTribAck As CTributeAcknowledgee
        'Get the Honoree Record
        MsgBox("Load Record: " & Import.Fields.GetByName("HonoreeID").Value)
        oRec.LoadByField(ERecordsFields.RECORDS_fld_CONSTITUENT_ID, Import.Fields.GetByName("HonoreeID").Value)
        ' Get the tribute
        MsgBox("Load Tribute")
        oTribute = oRec.Tributes.Item(Import.Fields.GetByName("TributeID").Value)
        'Get the tribute acknowledgee
        MsgBox("Load Ack")
        ' Cycle through the acks and set blank to Tribute Card
        For Each oTribAck In oTribute.Acknowledgees
        MsgBox("Found Ack Letter: " & oTribAck.Fields(ETributeAcknowledgeeFields.TributeAcknowledgee_fld_LETTER)& "END")
        ' If the letter is blank, make it Tribute Card
        If oTribAck.Fields(ETributeAcknowledgeeFields.TributeAcknowledgee_fld_LETTER) = "" Then
        MsgBox("Blank Tribute Letter!")
        oTribAck.Fields(ETributeAcknowledgeeFields.TributeAcknowledgee_fld_LETTER) = "Tribute Card"
        MsgBox("Ack Letter After: START-" & oTribAck.Fields(ETributeAcknowledgeeFields.TributeAcknowledgee_fld_LETTER)& "-END")
        End If
End If

How about this?:

This totally worked!

I'm obviously still a little behind on understanding RE API processing but the good news is that I am almost done with this epic Tribute addon!

One great breakthrough that I had is that, although you can't pop up interactive forms (easily) to enter data, you can pop up MsgBox forms with different kinds of buttons that allows the processor to interact with the import as it is happening.

Something like:


The In memory tribute you are importing doesn't have an acknowledgee, do you still want to add it?

[YES] [ NO]


-- Tribute Linking --
There are multiple tributes of the same type on this record, do you want to link to one of them or add a new tribute?
1) In Honor of Wayne
2) In Honor of The Pozzar Family
3) In Honor of Wayne & Rachel's wedding

YES: Link to a current tribute NO: Add as new tribute
CANCEL: Skip this tribute


Login or Signup to post a comment