none
PowerShell Form library item update doesn`t fier ItemUpdated event when doing the bulk update

    Question

  • Hi,

    I have a form library with ItemUpdated Event handler that do some specify work, I am updating the value of one of the column from form library called EmailSendToCustomer =0 and it does update the Modified datetime, it means it does execute, we have around 1000 item in form Library.

    PowerSheel command-

    $web = Get-SPWeb http://collaboration.uk.briggsequipment.net/engineers/
    $list = $web.Lists["Jobsheets"]

    foreach ($item in $list.Items)
    {

    $item["EmailSendToCustomer"] = 0;
    $item.Update();

    }

    But this doesn't fire the ItemUpdate event hander associated with this form library, but If I select the row and edit and save then the event handler does fire and work as accepted.

    Can some one guide me, what could we the cause behind of not firing the event handler when I run the bulk update through powershell.

    regards,


    ARUN


    • Edited by D.ARUN Tuesday, August 07, 2012 8:55 AM
    Tuesday, August 07, 2012 8:54 AM

All replies

  • Hi D.ARUN,

    I have a test in my local server, create a ItemUpdated event for a form library, then use PowerShell to update the form item, the event receiver can be fired as expected.

    To narrow down this issue, would you please try this with a list with less items, to check whether your event receiver are fired. And also check your event receiver code, whether SPWeb is in the correct context if it is used, it would be properties.Web.

    Thanks,


    Qiao Wei

    TechNet Community Support

    Monday, August 13, 2012 6:33 AM
  • Hi,

    Thanks for your reply.

    I confirm that my event handler is working fine.

    The only difference that I can see in your scenario and mine is I am making a bulk update to a particular column in a form library around 600 rows.

    Do you think this can make a difference, in term of event execution?

    regards,

    Arun


    ARUN

    Monday, August 13, 2012 7:47 AM