I have jscript that loads a field value when the opportunity form is created (FormType ==1). However, when using the our of box Lead Qualify function, the Opportunity code does not run. Any ideas on why and how to fix?
function ElectricMargin_oncreate()
{
var EM = Xrm.Page.getAttribute("esui_electricmargin");
var FormType = Xrm.Page.ui.getFormType();
if(FormType == 1)
{
EM.setValue(0.0015);
}
}
Ken Compter