Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

Data in fields get removed....

$
0
0

I am having an issue with the below script.  When I put information in the null fields below and having nhs_accumulatorsource not filled in, then click save, it wipes the data out and it shouldn't.  It should only wipe the data out when nhs_accumulatorsource contains data


function AccumulatorIDOnChange()
{
var AccumulatorID = Xrm.Page.getAttribute("nhs_accumulatorsource").getValue();
if (AccumulatorID != null || AccumulatorID != 'undefined' || AccumulatorID !='')
{
Xrm.Page.getAttribute("new_fileformat").setValue(null);
Xrm.Page.getAttribute("nhs_accumulatorfilelayoutcomment").setValue(null);
Xrm.Page.getAttribute("nhs_programmingtype").setValue(null);
Xrm.Page.getAttribute("nhs_ftpprovider").setValue(null);
Xrm.Page.getAttribute("new_productionftpdirectory").setValue(null);
Xrm.Page.getAttribute("nhs_productionfilename").setValue(null);
Xrm.Page.getAttribute("new_monday").setValue(null);
Xrm.Page.getAttribute("new_tuesday").setValue(null);
Xrm.Page.getAttribute("new_wednesday").setValue(null);
Xrm.Page.getAttribute("new_thursday").setValue(null);
Xrm.Page.getAttribute("new_friday").setValue(null);
Xrm.Page.getAttribute("new_saturday").setValue(null);
Xrm.Page.getAttribute("new_sunday").setValue(null);
Xrm.Page.getAttribute("new_approximateloadtime").setValue(null);
Xrm.Page.getAttribute("nhs_holidayschedule").setValue(null);
Xrm.Page.getAttribute("nhs_accumulatorfrequencycomments").setValue(null);
Xrm.Page.getAttribute("nhs_accumulatorresultserrorfile").setValue(null);
Xrm.Page.getAttribute("nhs_resultserrorftpdirectory").setValue(null);
Xrm.Page.getAttribute("nhs_resultserrorfilename").setValue(null);
Xrm.Page.getAttribute("nhs_resultserrorfilecomments").setValue(null);
}
}


function AccumulatorIDOnLoad()
{
AccumulatorIDOnChange();
}


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images