+ Start a Discussion
Gerardo Rodriguez LaraGerardo Rodriguez Lara 

Unit: Create an Indicator Badge Apex Service

Hello everyone, I am working one the Module Build Reusable Lightning Components in the Unit Create an Indicator Badge Apex Service, I did all the steps but when I tried to verify this step I get an error: "Challenge Not yet complete... here's what's wrong: 
There was an unexpected error in your org which is preventing this assessment check from completing: System.ListException: List index out of bounds: 0"

Since it is only two Copy / Paste the chanllange of this unit, can someone help me with this ?

Gerardo Rodriguez LaraGerardo Rodriguez Lara
ScreenShoots:

User-added image

User-added image
Dmitry KardashovDmitry Kardashov

Hello Gerardo,

I had the same problem. Did you click "Initialize Sample Data" button on the Load Data page?

User-added image

When you click this button, you should see the success message:

User-added image

I think that the problem is in a data import. Check this and try to verify step again

JuanTest JardimJuanTest Jardim
Hello all,

I can't import the data. I get the following error:User-added image
Nuno MatosNuno Matos
I too was having a problem importing the data. The dates generated on LoadZBSData.vfp were the problem.
Outputing one of them returned invalid date. To fix it I replaced:
var past2 = new Date(yrsago2+'-'+month+'-'+day);
var past1 = new Date(yrsago1+'-'+month+'-'+day);
var future1 = new Date(yrsahead1+'-'+month+'-'+day);
var future2 = new Date(yrsahead2+'-'+month+'-'+day);
with:
 
var past2 = new Date(yrsago2,month,day);
var past1 = new Date(yrsago1,month,day);
var future1 = new Date(yrsahead1,month,day);
var future2 = new Date(yrsahead2,month,day);

Then I imported the data and the challenge was successfull.
umit uckanumit uckan
Thanks for that Nuno Mator! 
Also change delete with database.delete as allornone false on ZBSDataLoadController if needed.
Nagarjuna ParalaNagarjuna Parala
Thank you@
Dmitry Kardashov.Its working!!!
Francis CrumpFrancis Crump
My vfp data didn't look like above, it looked like:  new Date(); for all of the var

I tried the changes and still gave error on initialize sample data step.