CDam

Hello,

I'm meeting a problem with sharepoint list event handler maybe anyone will be able to help me....

I made an event handler in my list. It's working when I update my list item using sharepoint form (editform.aspx).

Otherwise, using C# code to update my list item, the update event is not fired...

Did you know why Have you already met this kind of problem

Many thanks for your help and your answer!

My code is not so long :

SPSite currentsite = new SPSite("http://...");

SPWeb currentweb = currentsite.RootWeb;

SPList liste = currentweb.Lists["TEST "];

SPListItem listeitem = liste.GetItemById(ID);

listeitem["Title"] = "New TITLE";

listeitem.Update();



Re: SharePoint - Development and Programming Event handler on list items not fired using code ...

amishjt

Hi,

Are you using DisableEventFiring and EnableEventFiring in your code. this can be one of the reason your code is not getting fired.

Regards,






Re: SharePoint - Development and Programming Event handler on list items not fired using code ...

CDam

Hello,

Many thanks for your answer, but unfortunately I'm not using DisableEventFiring and EnableEventFiring method in my code...

I'm still looking for why my events handler not fired...

Thanks.





Re: SharePoint - Development and Programming Event handler on list items not fired using code ...

optionDK

Hi

If you are using the Visual Studio Extensions for Windows Sharepoint Services (VSeWSS) to create and deploy your eventhandler you'll have to manually enable the event in the properties of the feature containing the list eventhandler. (Goto your project's properties, find the Sharepoint tab and find the feature. Unfold the feature by clicking on the + and then change FALSE to TRUE for the event you want to fire.

Happy coding

Henrik Sorensen

OPTION Denmark