Skip to main content
deleted 114 characters in body
Source Link
Adam
  • 4.4k
  • 1
  • 27
  • 29

This issue makes sense to me:

system.assertEquals(RAELS.size(), srListIds.size()); // <--- this fails

since you're calling Database.insert(nwAssnmnt, false); which means it won't fail the entire insert if just one of the inserts fails (false = partial processing is permitted). So just one fail would happen silently andmean your two lists would be of different sizes. The return value can be examined to determine success or failure results (in Database.SaveResult).

As for your SOQL statement, I believe you want to do an IN. So:

Related_Activity_Event__c IN :RAELS

would check for Related_Activity_Event__c in all of the elements in RAELS.

This issue makes sense to me:

system.assertEquals(RAELS.size(), srListIds.size()); // <--- this fails

since you're calling Database.insert(nwAssnmnt, false); which means it won't fail the entire insert if just one of the inserts fails (false = partial processing is permitted). So just one fail would happen silently and your two lists would be of different sizes. The return value can be examined to determine success or failure results (in Database.SaveResult).

As for your SOQL statement, I believe you want to do an IN. So:

Related_Activity_Event__c IN :RAELS

would check for Related_Activity_Event__c in all of the elements in RAELS.

This issue makes sense to me:

system.assertEquals(RAELS.size(), srListIds.size()); // <--- this fails

since you're calling Database.insert(nwAssnmnt, false); which means it won't fail the entire insert if just one of the inserts fails (false = partial processing is permitted). So just one fail would mean your two lists would be of different sizes.

As for your SOQL statement, I believe you want to do an IN. So:

Related_Activity_Event__c IN :RAELS

would check for Related_Activity_Event__c in all of the elements in RAELS.

Source Link
Adam
  • 4.4k
  • 1
  • 27
  • 29

This issue makes sense to me:

system.assertEquals(RAELS.size(), srListIds.size()); // <--- this fails

since you're calling Database.insert(nwAssnmnt, false); which means it won't fail the entire insert if just one of the inserts fails (false = partial processing is permitted). So just one fail would happen silently and your two lists would be of different sizes. The return value can be examined to determine success or failure results (in Database.SaveResult).

As for your SOQL statement, I believe you want to do an IN. So:

Related_Activity_Event__c IN :RAELS

would check for Related_Activity_Event__c in all of the elements in RAELS.