I have a file of event registrants that I would like to import but some of them will be in the database and some won't. Is there any way of knowing if IOM found a match in the database during import so I can set the Participant is a Constituent field to Yes or No?
I've tried the following code with no luck:
Public Overrides Sub BeforeConstituentSave(ByVal oRec As Blackbaud.PIA.RE7.BBREAPI.CRecord, _
Cancel as ImportOM.API.iCancel)
'The main constituent record is about to be saved
'Non-Constituent Code
If oRec.Fields(Blackbaud.PIA.RE7.BBREAPI.ERECORDSFields.RECORDS_fld_ID) = "" Then
That is a cool idea. It never crossed my mind I could save data back to the spreadsheet during import. thank you.
J
Jeffrey Montgomery
said
about 6 years ago
PS - I finally beat Wayne to an IOM API post, so I'm just going to take a moment and savor that... :)
J
Jeffrey Montgomery
said
about 6 years ago
Hi Chris,
I love that you're using the API, but I think in this case you can just leave the static field set to "No". If IOM does match to an existing full constituent, the "Is constituent" field will be ignored, because IOM is not going to "demote" a full constituent in this case. Keep the code coming though!!
Chris DeMaster
I have a file of event registrants that I would like to import but some of them will be in the database and some won't. Is there any way of knowing if IOM found a match in the database during import so I can set the Participant is a Constituent field to Yes or No?
I've tried the following code with no luck:
Public Overrides Sub BeforeConstituentSave(ByVal oRec As Blackbaud.PIA.RE7.BBREAPI.CRecord, _
Cancel as ImportOM.API.iCancel)
'The main constituent record is about to be saved
'Non-Constituent Code
If oRec.Fields(Blackbaud.PIA.RE7.BBREAPI.ERECORDSFields.RECORDS_fld_ID) = "" Then
import.fields.Getbyexcelname("S").Value = "No"
Else
import.fields.Getbyexcelname("S").Value = "Yes"
End if
End Sub