Start a new topic

Code in AfterDictionaries no longer being accessed

Hey Guys,

I just installed and I'm running one of my profiles that has some code in it. All of my code is within AfterDictionaries. Every row of the file is producing the following error message: 

Error in custom code AfterDictionaries: Object reference not set to an instance of an object. Line:0 [CImport_Process_02.6]


The code hasn't changed since running it in 

I added a MsgBox to see if it was hitting my code, since I don't have a Line 0 and that isn't working either. Also, typically when I type in Public Overrides intellisense would typically help autocomplete the Sub AfterDictionaries, however Sub AfterDictionaries is no longer in the list. 



Some further testing has shown, what is throwing the error is anytime I attempt to reference a Virtual Field by name, for example: Import.Fields.GetByName("Nickname").Value. Everything works if I change that to Import.Fields.GetByExcelName("DA").Value



I'm not able to recreate this. I setup a new profile with some basic constituent info columns, added a virtual field, added some code to pull the value from the virtual field in AfterDictionaries using GetByName and it all works. Is there any other information you can give?

I run the profile through list management, not sure if that will have an affect on it. I've noticed there seems to be some subtle differences between running them through List Management. For example, it doesn't appear to promote Spouses to full constituents, even though it does running a regular Import.


Here's what a line in the code looked like before:

Import.Fields.GetByName("Rel First Name").Value = import.Fields.GetByName("FirstName").Value


Import.Fields.GetByExcelName("CN").Value = import.Fields.GetByName("FirstName").Value


Do you have any columns real or virtual that do not have the name filled out?  I was able to recreate the error with a virtual field that had no name provided.  It's a simple fix that we'll add to the backlog and a simple work around.
Hey Nic,

That was it. The file I receive from WealthPoint OnTime has blank columns, so we just never bothered giving them a name. Once I filled out the name, everything works great.

Thanks for the help!
Login or Signup to post a comment