Hey Jeff,
I have no trouble when I make manual changes to the file and run the row without the code. That's what I have done in the past. I'm trying to add the code, so I can run the file without so much intervention from myself or my users.
Thanks,
Jonathan
Jonathan Meester
I have an export file from our 3rd party fundraising website that places the home address in one set of columns (ex. G-K) the business address in another set of columns (ex. M-Q). Within my IOM profile I've mapped G-K to Constituent Address fields and added the following code in the API:
Public Overrides Sub AfterDictionaries(ByVal Cancel As ImportOM.API.iCancel)
MyBase.AfterDictionaries(Cancel)
'Set AddressType to Home
If Import.Fields.GetByName("HomePreferredAddress").Value = "y" Then
Import.Fields.GetByName("Address Type").Value = "Home"
End If
'Move data as needed for a business address
If Import.Fields.GetByName("BusinessPreferredAddress").Value = "y" Then
Import.Fields.GetByName("HomePreferredAddress").Value = "n"
Import.Fields.GetByName("Address Type").Value = "Business"
Import.Fields.GetByName("HomeAddressLine1").Value = Import.Fields.GetByName("BusinessAddressLine1").Value
Import.Fields.GetByName("HomeAddressLine2").Value = Import.Fields.GetByName("BusinessAddressLine2").Value
Import.Fields.GetByName("HomeAddressLine3").Value = Import.Fields.GetByName("BusinessAddressLine3").Value
Import.Fields.GetByName("HomeAddressLine4").Value = Import.Fields.GetByName("BusinessAddressLine4").Value
Import.Fields.GetByName("HomeCity").Value = Import.Fields.GetByName("BusinessCity").Value
Import.Fields.GetByName("HomeProvince").Value = Import.Fields.GetByName("BusinessProvince").Value
Import.Fields.GetByName("HomePostalCode").Value = Import.Fields.GetByName("BusinessPostalCode").Value
Import.Fields.GetByName("HomePostPermission").Value = Import.Fields.GetByName("BusinessPostPermission").Value
End If
End Sub
The code runs find when I test it, however when I run the actual Import, it hangs up on the first record that uses the code. I ran a performance log and the record it was hanging on it appears to hang up during the "Duplicate Search".
Any suggestions why this might be?
Thanks for the help,
Jonathan