Start a new topic

How to prevent IOM from trying to create a financial relationship

Hi all,

Once again I find myself confronted with the dreaded error message: "Bank information did not exist on the constituent record and could not be created.

Unfortunately the first hit on Google is another question I asked on this forum and I'm pretty sure this is a wholly different situation: whereas previously I was struggling to get a relationship added, I now find myself trying to suppress the creation of new relationships in certain situations.

The files I'm currently working on have a mix of positive and negative responses to a direct debit ask. Normally I use dictionaries / the API to blank out fields pertaining to records that I don't want to be created. I.e. if I were importing cash gifts and wanted to handle negative responses, I would blank out any gift fields and this would prevent any gift from being created.

Direct debits involve financial relationships. Unfortunately the above method does not seem to prevent IOM from trying to create financial relationship for the negative responses. Instead, for each negative response I get an the above error.

Is there a way to use the API to prevent IOM from trying to create these relationships?

Many thanks,


For what it's worth, I got around this by splitting the import into two passes. On the second pass I use custom code to skip rows without a recurring gift.


Hi Tom,

I was working with another client trying to solve a similar issue... rows came out as exceptions because a gift did not have all the required fields, but the user did not expect any gift fields to have values on these rows. Using the IOM API, you could use the code demonstrated here to cycle through all the fields on the object that should not be created (before it is saved) to see what fields have been set, in order to narrow down what is causing the record to be created. Let me know if this helps...


Hi Jeff,

Thanks for getting back to me. That code looks really interesting. I think a simpler solution (for an end-user) would be something like

[code]If Import.Fields.GetByName("Sort code").Value = "" Then Import.Objects["Bank"].Clear()[/code]

Any chance we'll see this sort of functionality in a future version of IOM?

Login or Signup to post a comment