I have a post-operation create plugin that is triggered for the creation of a new contact. This plugin looks at a preset list of marketing lists and attempts to add the newly created contact to those preset marketing lists.
I also have a plugin that operates on the message "AddMember" during the pre-operation stage called PreventDuplicates. This plugin attempts to retrieve the contact record based on the contactid (entityid) passed in because it needs more attribute information regarding the contact (especially the ownerid). PreventDuplicates verifies there are no other contacts in the specified marketing list that has the same email address and is owned by the same owner.
The problem I am running into is that the PreventDuplicates plugin is reporting back "contact With Id = xxxxxxxx-xxxx-xxxx-xxxxx-xxxxxxxxxxxx Does Not Exist". It seems like during the Post-operation phase of a Create message, the record hasn't yet been committed to the database. I would appreciate if anyone has a suggestion on how to alleviate this problem.