function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SUCHARITA MONDALSUCHARITA MONDAL 

I'm trying to create new record using 'recordEditForm'. I'm cloning new record from existing record and also prepopulating some value to that . But on submitting the record not able to create new record.

here is the controller code..

({
    doClose : function(component, event, helper) {
        var recid = component.get("v.recordId");
        var urlEvent = $A.get("e.force:navigateToURL");
        urlEvent.setParams({
            "url": "/"+recid
        });
        urlEvent.fire();
        
    },
    handleSubmit : function(component, event, helper) {
        component.find("recordEditForm").submit();
        
        var payload = event.getParams().response;
        debugger;
        console.log(payload.id);
    }
})