JavaScript controller

    let ccbhold = component.find("Ccommentbody").get("v.value");
    let phold = component.get("v.Cispublished");
    let idhold = component.get("v.recordId");

    var action = component.get("c.createccapex");
    action.setParams({parentid : idhold, ccbody : ccbhold, bpublic : phold});


        var state = response.getState();

        if(state === "SUCCESS"){
            component.set("v.showcreatemodal", false);


Apex Controller:

public static void createccapex(ID parentid, String ccbody, Boolean bpublic){
    Casecomment cc = new Casecomment();
    cc.parentid = parentid;
    cc.CommentBody = ccbody;
    cc.ispublished = bpublic;
    insert cc;

The record inserts properly, the modal window closes, the refresh happens, but only on the header and the right bar.

the only thing that doesn't refresh is the parent component(which is a tab on the detail page of the record.

  • the parent component should listen to the refresh event. Which component is it? Mar 25 '18 at 10:34
  • its the component itself that doesn't refresh. I fixed it in my code by running init again as well as forcing a refresh.
    – Tim Willis
    Mar 26 '18 at 18:12

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.