function hideAgency() {
if (Xrm.Page.getAttribute("kore_agencyid").getValue() != null) {
    Xrm.Page.getAttribute("kore_agencyid").setValue(null);
}

if (Xrm.Page.getAttribute("parentaccountid").getValue() != null) {
    Xrm.Page.getAttribute("parentaccountid").setValue(null);
}

$('#kore_agencyid_c').parent().hide();
$('#parentaccountid_c').parent().hide();
}