0

I tried to do Cascade deleting in two of my colums. If I deleted in First List record i wated deleted all records at Secound List bounded with records from List One. I adding bounded data first in Items Adding. But if I adding in ItemsAdding the last element of adding items are not exist Could I add him in Items Added element. Only one column with bounded record to delete cascade all bounded data.

1

Of course it can be done with Item Receiver but i dont understand if that's eaxctly your requirement then why dont you use lookup column with cascade delete?

Anyway write your code in ItemDeleting, you must have some relation ship between columns to delete them, say you have included ID column of first list as relationship (you can say foreign key) in second list column "RefID" then in event receiver write a CAML query to "RefID" retrieve item from the second list with "RefID"=Deleting item ID, and delete those records

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.