I have created a custom web part that insert an item into a list. I deployed this web part to production and all seems to be working well.
I now created a workflow on this list in Designer. Once a record gets inserted I need an email to be sent. I'm testing and this is what happens:
Via the web part an item in the list is created and the workflow does not seem to be triggered.
I insert a new item in the list using the UI by clicking on "Add a new item" and the workflow is triggered.
Is there any way to get the workflow to work when new item is created by the web part? Should it matter how the item gets created as long as a new item is created in the list?