We are creating the records using the Lightning component like below

   var createRecordEvent = $A.get("e.force:createRecord");

        "entityApiName": "Contact", 
        "defaultFieldValues": {


Is there any way to get the ID of the created record after the event is fired and the record is saved.


1 Answer 1


create a callback apex class (@AuraEnabled) which would return the Id when the record is created...

in the callback function check for the Id with the getReturnValue() method from the response..

Hope this helps!!

Not the answer you're looking for? Browse other questions tagged .