1

I have 2 Lists:

List A

  • Title
  • Category (lookup to Category List) (choices A, B C)
  • Price (number field)
  • Category Total (number field)
  • ...Some other fields

List B

  • Title
  • CategoryA Price (number field)
  • CategoryB Price (number Field)
  • CategoryC Price (number field)
  • Changes Pending (bool / checkbox, default "no")
  • ...Some other fields

List B has itemUpdating event receiver that goes to List A, and gets the price, does some calculations and saves that price in the CategoryX Price field before setting "pending changes" to false. This works fine when triggered from List B.

List A also has itemUupdating and itemUpdated event receivers. When I change Price, itemUpdating loops through List A and sums up the Prices for the same category and saves it in Category Total for all items with the same category. ItemUpdated goes to List B and sets "Changes Pending=yes" on items with the same category. Event firing is enabled on purpose so that list B itemUpdating fires and refreshes itself with new Price from List A.

Problem: When I change the Price in list A, only the first 3 items in list B get updated properly. (there is around 15 items to be updated). How can I ensure that list B event receivers completed for all items? (additionally, when I attach debugger to list B itemUpdating and change Price in List A, debugger never fires off and none of the items in list B get updated)

Environment SP 2010 Server on VM. VS2010 Sandboxed solutions (can't use farm). All event receivers have default sequence number. -ing events are synchronous and -ed events are asynchronous.

Peter Soxx
  • 11
  • 2
  • When I delete first item in List B, and change price in List A, again the top 3 items(the third item is what used to be 4th item which didn't fire before) are updated correctly with the remaining items failing to fire itemUpdating event. This tells me that I'm correctly changing PeningChanges on all items. – Peter Soxx Apr 23 '13 at 15:20

0 Answers0