﻿
function DPRIS_onChange(){
// clear associated fields when DPRIS changes
	if (Xrm.Page.getAttribute("vhacrm_dpris_bool").getValue() != true) {
	    Xrm.Page.getAttribute("vhacrm_verifiedindpris_code").setValue(null);
        Xrm.Page.getAttribute("vhacrm_dprisdate_date").setValue(null);
    }
}

function VIS_onChange(){
// clear associated fields when VIS changes
	if (Xrm.Page.getAttribute("vhacrm_vis_bool").getValue() != true) {
	    Xrm.Page.getAttribute("vhacrm_verifiedinvis_code").setValue(null);
        Xrm.Page.getAttribute("vhacrm_visdate_date").setValue(null);
    }
}

function SHARE_onChange(){
// clear associated fields when SHARE changes
	if (Xrm.Page.getAttribute("vhacrm_share_bool").getValue() != true) {
	    Xrm.Page.getAttribute("vhacrm_verifiedinshare_code").setValue(null);
        Xrm.Page.getAttribute("vhacrm_sharedate_date").setValue(null);
    }
}

function HINQ_onChange(){
// clear associated fields when HINQ changes
	if (Xrm.Page.getAttribute("vhacrm_hinq_bool").getValue() != true) {
	    Xrm.Page.getAttribute("vhacrm_verifiedinhinq_code").setValue(null);
        Xrm.Page.getAttribute("vhacrm_hinqdate_date").setValue(null);
    }
}

function VBMS_onChange(){
// clear associated fields when VBMS changes
	if (Xrm.Page.getAttribute("vhacrm_vbms_bool").getValue() != true) {
	    Xrm.Page.getAttribute("vhacrm_verifiedinvbms_code").setValue(null);
        Xrm.Page.getAttribute("vhacrm_vbmsdate_date").setValue(null);
    }
}

function DD214_onChange(){
// clear associated fields when DD214 changes
	if (Xrm.Page.getAttribute("vhacrm_dd214_bool").getValue() != true) {
	    Xrm.Page.getAttribute("vhacrm_verifieddd214_code").setValue(null);
        Xrm.Page.getAttribute("vhacrm_dd214date_date").setValue(null);
    }
}

function ORDERS_onChange(){
// clear associated fields when ORDERS changes
	if (Xrm.Page.getAttribute("vhacrm_orders_bool").getValue() != true) {
	    Xrm.Page.getAttribute("vhacrm_verifiedinorders_code").setValue(null);
        Xrm.Page.getAttribute("vhacrm_ordersdate_date").setValue(null);
    }
}

function Other_onChange(){
// clear associated fields when Other changes
	if (Xrm.Page.getAttribute("vhacrm_other_bool").getValue() != true) {
	    Xrm.Page.getAttribute("vhacrm_verifiedinother_code").setValue(null);
        Xrm.Page.getAttribute("vhacrm_otherdate_date").setValue(null);
        Xrm.Page.getAttribute("vhacrm_othertext_text").setValue(null);
    }
}