Skip to main content

I'm not understanding why I could not validate the exercise (I don't know if is my ADHD talking lol).

The register is in the House.csv and I could find it in the org...  What Am I missing?

I cannot validate my exercise: create a data model using clicks

 

house-csv-create-a-data-model-using-clicks.png

 

org-register-create-a-data-model-using-clicks.png

4 answers
  1. Nov 30, 2023, 9:37 AM

    The validation is running for House Field, not for House Name. That's why validation getting failed to fix the validation just needs to be copied House Name into House field that's showing now auto generated salesforce Id.

     

    You can use below SOQL to copy the House Name into House field

     

    List<House__c> houses = [Select Ids__c, House_Name__c, Name from House__c];

     

    for(House__c h : houses){

        

        h.Ids__c = h.Name;

        h.Name = h.House_Name__c;

     }

     

    update houses;

     

    Note : I've created custom Id field to store auto generated salesforce Id. You can also or just remove the  h.Ids__c = h.Name; line from above apex code.

     

    Thanks

    Learn & Grow

0/9000