0

I have a very simple code but I can't change a property in an ItemUpdated event receiver

  public override void ItemUpdated(SPItemEventProperties  properties)
  {
       base.ItemUpdated(properties);
       using(DisabledEventsScope scope = new DisabledEventsScope())
       {
           SPListItem listItem = properties.ListItem;
           listItem["Title"] = "A cool new title!";
           listItem.Update();
       }
  }

it doesn't throw any errors but the property is not being updated.

1 Answer 1

0

I would first check if your Event Receiver is attached to the list.

It's easy to view all attached Event Receivers with PowerShell:

$web = Get-SPWeb <Url>
$list = $web.Lists["<ListName>"]  
$list.EventReceivers

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.