Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Event Handlers not firing in Tasks webpart

  Asked By: Anish    Date: Jul 06    Category: Sharepoint    Views: 2861

I have set up an ItemUpdating Event Handler as a feature for the
Task List(set the templateId to 107 for the tasks list). It fires
when I go directly to the task list and edit a task item. However, I
have added the tasks webpart to the main page which has a link to
each task's display form(DispForm.aspx). When I click Edit Item from
this DispForm.aspx to the edit item and save, the ItemUpdating event
does not fire?

Has anyone ever run into any problems with the event handler not
firing from the webpart that surfaces the list??

The url of both places is similar.. the only thing different is the
source query parameter...

server/sites/siteName/Lists/Tasks/EditForm.aspx?" target="_blank" rel="nofollow">server/sites/siteName/Lists/Tasks/EditForm.aspx?

server/sites/siteName/Lists/Tasks/EditForm.aspx?" target="_blank" rel="nofollow">server/sites/siteName/Lists/Tasks/EditForm.aspx?



1 Answer Found

Answer #1    Answered By: Emmett Hyde     Answered On: Jul 06

I worked through this problem. It ends up that I have to move my
code to the ItemUpdated event  because the new changes to the task
were not saved in the ItemUpdating event. I was trying to use
properties.AfterProperties.ChangedProperties to access what has
changed. When I used ItemUpdated the changes were already saved in
the Content Database and accessible.

Also, a side note that when using ItemUpdating or ItemUpdated the
properties.AfterProperties.ChangedProperties or the
properties.BeforeProperties.ChangedProperties collections are
sometimes empty when there are changes. Here is the msdn link to the
bug: http://msdn2.microsoft.com/en-

Didn't find what you were looking for? Find more on Event Handlers not firing in Tasks webpart Or get search suggestion and latest updates.