JavaScript controller
createCC:function(component,event,helper){
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});
action.setCallback(this,function(response){
var state = response.getState();
if(state === "SUCCESS"){
component.set("v.showcreatemodal", false);
$A.get('e.force:refreshView').fire();
}
})
$A.enqueueAction(action);
}
Apex Controller:
@AuraEnabled
public static void createccapex(ID parentid, String ccbody, Boolean bpublic){
Casecomment cc = new Casecomment();
cc.parentid = parentid;
cc.CommentBody = ccbody;
system.debug(bpublic);
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.