One function we would love is to not show the convert button on the lead unless it's the right time to convert (ie. the correct stage with all data gathered).
I have created a Lightning component which can easily modify the CSS of the lead page. However, I am struggling implementing the JS side which I want to find the Convert button and hide it.
this works in Jfiddle and browser extensions, but not in salesforce itself. Something is getting in the way. Any ideas?
function HideConvert() {
var elements = document.querySelectorAll('[title=\"Convert\"');
for (var i = 0; i < elements.length; i++) {
elements[i].style.display = "none";
}
}