I am very new to Dynamics and am wanting something which when a lead is created my workflow will create a contact. However I do not want duplicate contacts to be created. I read that duplication detection does not work in workflows and that I need to write a plugin. I am following this tutorial. I have created a EmailExists entity and referenced the Lead entity. What I need to do is get that Lead entity and then check whether or not a contact exists with that leads email address. I'm pretty much stuck on how to get the lead from my custom entity and then query the contactbase. Any suggestions or further reading would be greatly appreciated.
Thanks in advance