Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

187
Views
Call SF Event from Aura component

I'm trying to open the Note editor from a custom button on the Event record. Based on this current solution I have created a new Aura component that is called on button press. The aura first inserts a Note record in DB and return the Id of the note back to the helper. It is then supposed to use that Id in order to call the open note event that SF provides. My helper looks like:

({
createNewNote : function(cmp){
    var that = this;
    var action = cmp.get("c.insertNewNote");
    action.setParams({"parentId": cmp.get("v.recordId")});
    action.setCallback(this, function(response) {
        var state = response.getState();
        if (state === "SUCCESS") {
            cmp.set("v.newNoteId", response.getReturnValue());
            console.log(cmp.get('v.newNoteId'));
            that.editNote(cmp, response.getReturnValue());
        }
        else {
            console.log("Failed with state: " + state);
        }
    });
    $A.enqueueAction(action);
},

editNote : function(cmp, noteId) {
    console.log('in evt', noteId);
    var editEvent = $A.get("e.notes:editNote")
    console.log(editEvent);//this is undefined
    editEvent.setParams({
        "noteId": noteId
    });
    editEvent.fire();
}
})

Problem is that this line $A.get("e.notes:editNote") is undefined and I get an error when I try to set the parameters.

I have already tried calling the action like window.$A.get("e.notes:editNote") but without any success. Also I made sure that the event exists. When I call window.$A.get("e"); in chrome console I can find it as it followsevent in console

I have also tried different variants of getting the event in the console, but I only get undefined. Is there a way to call this event?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!