Created
February 21, 2019 19:33
-
-
Save choudharymanish8585/3303b1f2331692ef4a9b17066ada8084 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
onInit : function(component,event,helper) { | |
component.find("service").getNewRecord( | |
"Car_Experience__c", // sObject type (entityAPIName) | |
null, // recordTypeId | |
false, // skip cache? | |
$A.getCallback(function() { | |
var rec = component.get("v.carExperience"); | |
var error = component.get("v.recordError"); | |
var car=component.get("v.car"); | |
if(error || (rec === null)) { | |
console.log("Error initializing record template: " + error); | |
} | |
else { | |
component.set("v.carExperience.Car__c",car.Id); | |
} | |
}) | |
); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment