// This code will prevent the change of the appointment field on the New Claims form asfter the claim has been created.
// This will prevent ClaimIDs from being attached to appointments the claim is not for

function disable() {

    //get formtype
    var formType = window.parent.Xrm.Page.ui.getFormType();

    if (formType != 1) {//check to see if the form is not new
        window.parent.Xrm.Page.getControl('btsss_appointmentid').setDisabled(true);//disables the Appointment field
    }

}
