Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

189
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda