SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have 2 calender list Name A and B. when i delete items from list A, it should delete item from list B. List A items get deleted successfully but list B items throws SpException. but when i again run the program, it successfully deletes the items from B too. what can be the issue?. I am using DisabledItemEventsScope while deleting.

share|improve this question
Can you post here the exception? Code snippet would be also useful. – luccio Jul 25 '14 at 7:34
i solved it. i was not disposing web object. thanks anyways – SharePointHacker Jul 25 '14 at 7:39
up vote 1 down vote accepted

use this after listname.DeleteItemById

 SPWeb web = SPContext.Current.Web;
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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