• Ravi KumAR 1060
  • NEWBIE
  • 10 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 1
    Replies
I tried on off everything but still getting --User-added image
In HELPER

({
    helperMethodAgent : function(Component) {
        
        //for logs
        console.log('in create record function');
        
        //getting the candidate information
        var varAgent = component.get("v.AttrAgent");
        
        //Calling the APEX Function
        var action = component.get("c.CreateAgent");
        
        //setting the Apex Prameter
        action.setParams({
            Agent:varAgent
        });
        // setting the callback
        action.setCallback(this,function(response){
       
            //get the response state
            var state =response.getState();
            
       //check if result is successfull
            if(state=="SUCCESS") {
                //Reset Form
                var NewEmptyAgentRec = {'sobjectType':'Agent__c',
                          'Agent_Name__c': '',
                          'D_O_B__c' : '',
                          'Gender__c': '',
                          'Mobile_Number__c': '',
                          'Email__c' : '',
                          'Registration_Date__c': '',
                          'Address__c': '',
                          };
                //resetting the value in the form
                component.set("v.AttrAgent",NewEmptyAgentRec);
                alert('Record is Successfully Created');
              
    }
            else if(state="Error"){
                alert('error in calling Server side action');
           //error details
           var ErrorDetails = response.getError();
           alert('Reason of error = '+ErrorDetails[0].message)
            }
});
        //adds the server-side action to the queue
        $A.enqueueAction(action);
    }
});

Getting this error while saving
FIELD INTEGRITY EXCEPTION
Failed to save InsuranceAppRecordHelper.js: Expected ':', found 'STRING' [1, 13]: Source

Help me with this Code
Just Completed Admin superset and get all Superbadges.
But I want to know as mentioned in 1 page after completion you will get  $200 for certification Voucher. But from where and what condition I'll get that ???