title: Overriding the redirect on saving force:createRecord on Salesforce Lightning
body: <p>I need to override the redirect on save of a force:createRecord lightning component.</p>
  
  <pre><code>var eve = $A.get("e.force:createRecord");
  eve.setParams({
      "entityApiName": "Opportunity",
      "defaultFieldValues": {
          "AccountId" : accountId
      },  
      "panelOnDestroyCallback": function(event) {
          console.log('test');
          //console.log(event.getParam("id"));
          var urlEvent = $A.get("e.force:navigateToURL");
          urlEvent.setParams({
              "url": "&lt;some visualforce page url&gt;",
              "isredirect": "true"
          }); 
          urlEvent.fire();
      }   
  });
  eve.fire();
  </code></pre>