I'm writing a listener that associates content to channels based on a field in the CTD instead of requiring users to switch to the channels tab. Everything works fine when the content is being updated, but I’m having issues when trying to create new content.
Testing shows that as long as I am in the site area and only try to associate the content to one channel (the one I’m currently on in the site area) everything works properly. Things also work fine if I select multiple channels in my CTD field first and then add them to channels tab. However, when I try to create content from the project folders or try to associate multiple channels at one time the following error message pops-up on the CTD:
The following application error(s) occurred: Error during find or query
Obviously this is not how I want to have to do things. Can anyone tell me if there is a specific way I need to associate these channels (Currently I am using the PrePersistence.Create listener and calling the ContentInstance.setChannelAssociations()) method) to mimic the channel tab functionality so that whatever check is being doing in the background believes what my listener is doing is being done by channel tab?
Thanks for your help!
Millisa