function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
trssfbtrssfb 

odd bug with lists and updates campaignmembers and leads and contacts

All,


So I am putting this in just in case it benefits someone else and to blow off some steam.  I have a crazy client who has been riding my butt  because they need to launch for dreamforce and in final testing someone found that it was possible to pick up two copies of the same campaign member in a very complex set of dynamic soql queries.  I fixed this by adding a Set<Id> that prevents the same Id from being entered more than once in the List<CampaignMember> that gets sent to the final update.  Only I screwed up the patch, because I accidentally ran the data into the Set twice.  But I didn't notice because I only tested with leads, and they worked just fine.  When someone else tested in something other than the dev org, they found it was borked.  I tested again with contacts and found it was broken.  I added extra debugging that showed both leads and contacts resulted in 0 CampaignMembers added to the List<> that gets updated, yet leads were updating and contacts were not.  Doesn't inspire a lot of confidence in either my abillity or the way updates work.

Ricky MartinRicky Martin
If is this high priorit, let us know I will work. My skype id :rakishgobi05