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.

  • Can you post here the exception? Code snippet would be also useful. – luccio Jul 25 '14 at 7:34
  • 1
    i solved it. i was not disposing web object. thanks anyways – SharePointMan Jul 25 '14 at 7:39

use this after listname.DeleteItemById

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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