• Sven Francornel
  • NEWBIE
  • 10 Points
  • Member since 2017
  • Developer
  • ABSI NV


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies
Hello,
I am experiencing an issue while verifying step 7 of the Lightning Component Framework Specialist superbadge.

User-added image
The boat id is being set correctly when I filling in the form and the created record also has the Boat__c field filled in. I have been trying several ways to get past the verification, but I haven't been able to get past it. Does anyone see what I am doing wrong? Below you are able to see the onInit function.
 
onInit : function(cmp, evt) {
        cmp.find("service").getNewRecord(
            "BoatReview__c", 
            null,       
            false,     
            $A.getCallback(function() {                                 
                var error = cmp.get("v.recordError");
                if(error || (rec === null)) {
                    console.log("Error initializing record template: " + error);
                    return;
                }
                else {
                    var rec = cmp.get("v.boatReview");
                    rec.Boat__c = cmp.get('v.boat').Id;
                	cmp.set('v.boatReview', rec);
                }                
            })
        );
	}



 
I am working on the Lightning Component Superbadge and have gotten to step 4, I however, seem to be stuck on the FormSubmit event.
I've written it like this.
 
<aura:event type="COMPONENT"> <aura:attribute name="formsubmit" type="Boat__c[]"/> </aura:event>

But get this message.
Challenge Not yet complete... here's what's wrong: The FormSubmit event isn't configured correctly. There is something missing or improperly configured in the FormSubmit.evt file.
Hello,
I am experiencing an issue while verifying step 7 of the Lightning Component Framework Specialist superbadge.

User-added image
The boat id is being set correctly when I filling in the form and the created record also has the Boat__c field filled in. I have been trying several ways to get past the verification, but I haven't been able to get past it. Does anyone see what I am doing wrong? Below you are able to see the onInit function.
 
onInit : function(cmp, evt) {
        cmp.find("service").getNewRecord(
            "BoatReview__c", 
            null,       
            false,     
            $A.getCallback(function() {                                 
                var error = cmp.get("v.recordError");
                if(error || (rec === null)) {
                    console.log("Error initializing record template: " + error);
                    return;
                }
                else {
                    var rec = cmp.get("v.boatReview");
                    rec.Boat__c = cmp.get('v.boat').Id;
                	cmp.set('v.boatReview', rec);
                }                
            })
        );
	}



 
As we all know for production deployment , Test classes will be automatically running , right !!! . We have issue with that . Half of our test classes are failing because of access issues .

Items to note :
  • 1)in Our test classes it is not using any database data .ie SeeAllData =false
  • 2)First deployment to Production . No recordtypes available
  • 3) we are pushing admin profile in the package which have access to all the records types present .
Issue: Test class is using below statement for creating dummy record with specific record type Schema.SObjectType.Contact.getRecordTypeInfosByName().get('XXXXX').getRecordTypeId();

Actual Issue : As our production doesnt have any recordtype test class is failing saying it unable to find the record type .

Now million dollar question : How we can over come this issue . it is really blocking our production deployment