I have a custom object that has a lookup relationship with opportunity, on the opportunity's related list for this object I have added the New button and overriden it with a lightning component, I need to access the opportunity object. How can I do this ? Right now my init method fires the createRecord event, but I need to perform some custom validation before this.

doInit : function(component, event, helper) {
    var createWA = $A.get('e.force:createRecord');
    var id = component.get("v.recordId");
    console.log('rec id: '+id);
        console.log('create available');
        console.log('Create Record NA');


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.