Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

ItemAdded event not getting triggered on a list when a new item is added programmatically

$
0
0

We have an out-of-the-box workflow on a List (call list List A) where when a new item is added to the list, an email is sent to a certain person.  Independently of this, we have some custom code we wrote in which when the status of an item in some other list (e.g. List B) gets set to Approved, this list item is programmatically copied over into List A.  The problem we are experiencing is:

- when a person manually adds an item to List A, the workflow kicks in and the email is sent

- when a new item is inserted into List A programmatically, the workflow of sending an email does NOT get triggered.  So, somehow adding a list item to a list programmatically does not trigger the ItemAdded even and thus does not trigger the workflow associated with the ItemAdded event.

Is there any way to fix this?  Is there some way to programmatically trigger the "ItemAdded" event?  Note that we cannot programmatically send an email because we only manange one site collection and thus are only allowed sandboxed solutions, not farm solutions and in a sandboxed solution we don't have access to the smtp server information to send the email.

thanks,


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>