Hi,
I want to disable the system button "Print Quote for Customer" in Quote form on Draft state. I have written the following js code in form Onload. Its working fine when I have refresh the Quote form. Without refresh its not working.
function enablePrintButtonRules() {
var statecode = Xrm.Page.data.entity.attributes.get("statecode").getValue();
if (statecode == 0)
{
var printButton = window.top.document.getElementById("quote|NoRelationship|Form|Mscrm.Form.quote.PrintQuote-Large");
if (printButton != null)
{
printButton.disabled = true;
}
}
Please let me know how to handle this without refresh the form in this code. And let me know if any other approach.
}
Yadav