function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Shiv1231Shiv1231 

Remove save & New button on Opportunity edit page

I have created a new HTML component in home page and pasted this code. But it is not working. Please help.

 

 

<B>Test text for new js</B>
<SCRIPT type=text/javascript>
function addLoadEvent(func) {
    var oldonload = window.onload;
    if (typeof window.onload != 'function') {
        window.onload = func;
    } else {
        window.onload = function() {
            if (oldonload) {
                oldonload();
            }
            func();
        }
    }
}
addLoadEvent(function() {
    if(window.parent.document.getElementsByName("save_new" )[0]) {
        window.parent.document.getElementsByName("save_new" )[0].style.display='none';
        window.parent.document.getElementsByName("save_new" )[1].style.display='none';
    }
})
</SCRIPT>