Below is my script i am calling another function on window.onload. In my scripy "window.onload" function is not working. please advice me if anything wrong.
function GetQuoteStatus()
{
var value="true";
Xrm.Page.getAttribute("pricingrequest").setValue(value);
setTimeout(function () {
var id = Xrm.Page.data.entity.getId();
var entityLogicalName = Xrm.Page.data.entity.getEntityName();
Xrm.Utility.openEntityForm(entityLogicalName, id);
}, 500);
window.onload = pricingonload;
}
function pricingonload()
{
debugger;
var offerid=Xrm.Page.getAttribute("biz_offerid").getValue();
var accountid=Xrm.Page.getAttribute("biz_accountid").getValue();
if(offerid !=null &&accountid!=null)
{
var quotevalue=Xrm.Page.getAttribute("new_dfexpressquotestatus").getValue();
if(quotevalue =="Quote Completed")
{
Xrm.Page.ui.tabs.get("PricingInfo").setVisible(true);
}
}
}