document.addEventListener('cap_form_afterFormRender', function(evt) {
    try {
        if(cmp.href.getParam().qc == "ext") {
            document.getElementById("relationBtns").style.display="none";
            document.getElementById("attachment_wrap").style.display="none";
            document.getElementsByClassName("cmp-button-left-iconContent btn-box2")[0].style.display="none";
        }
    } catch(e) {

    }
});