Clicking Book Appointment, it gives error ,'The undefined value has no properties'.

GDG
Tera Contributor

In FSM on WO screen, there is UI action named Book Appointment, clicking it gives error as Your appointment cannot be scheduled. Reason: No valid application configuration found

 

I have the configuration set to scripted. everything is OOB. what is wrong 

 

GDG_0-1720773776114.png

 

1 ACCEPTED SOLUTION

Gopal Ware1
Tera Expert

Open the "Book Appointment" UI action. In OOB UI action we have a function "openAppointmentBookingPopup()". In this function
Comment out this line - w.setPreference('sysparm_catalogId',"");

Modify the following lines:
w.setPreference('sysparm_openedFor',g_form.getValue('opened_by'));
w.setPreference('sysparm_location',g_form.getValue('location'));

Modified Function :

function openAppointmentBookingPopup() {
    GlideUI.get().clearOutputMessages();
    taskId = g_form.getUniqueValue() + "";
    if(taskId){
        taskTable = g_form.getTableName() + "";
        //w = new GlideDialogWindow("sn_apptmnt_booking_appointmentBooking_Popup")
        w = new GlideModal('sn_apptmnt_booking_appointmentBooking_Popup');
        w.setSize('modal-lg','1000');
        w.setTitle(getMessage('Select Appointment'));
        w.setPreference('sysparm_taskId',taskId);
        w.setPreference('sysparm_taskTable',taskTable);
        //w.setPreference('sysparm_catalogId',"cb0c5a30ff1131007a6dffffffffff30");
        //w.setPreference('sysparm_catalogId',"");
        w.setPreference('sysparm_openedFor',g_form.getValue('opened_by'));
        w.setPreference('sysparm_location',g_form.getValue('location'));
        w.render();  
    }else{
        GlideUI.get().addOutputMessage({'msg':getMessage('Please select one task to book appointment'),'type':'error'});
    }
}

 

 

View solution in original post

1 REPLY 1

Gopal Ware1
Tera Expert

Open the "Book Appointment" UI action. In OOB UI action we have a function "openAppointmentBookingPopup()". In this function
Comment out this line - w.setPreference('sysparm_catalogId',"");

Modify the following lines:
w.setPreference('sysparm_openedFor',g_form.getValue('opened_by'));
w.setPreference('sysparm_location',g_form.getValue('location'));

Modified Function :

function openAppointmentBookingPopup() {
    GlideUI.get().clearOutputMessages();
    taskId = g_form.getUniqueValue() + "";
    if(taskId){
        taskTable = g_form.getTableName() + "";
        //w = new GlideDialogWindow("sn_apptmnt_booking_appointmentBooking_Popup")
        w = new GlideModal('sn_apptmnt_booking_appointmentBooking_Popup');
        w.setSize('modal-lg','1000');
        w.setTitle(getMessage('Select Appointment'));
        w.setPreference('sysparm_taskId',taskId);
        w.setPreference('sysparm_taskTable',taskTable);
        //w.setPreference('sysparm_catalogId',"cb0c5a30ff1131007a6dffffffffff30");
        //w.setPreference('sysparm_catalogId',"");
        w.setPreference('sysparm_openedFor',g_form.getValue('opened_by'));
        w.setPreference('sysparm_location',g_form.getValue('location'));
        w.render();  
    }else{
        GlideUI.get().addOutputMessage({'msg':getMessage('Please select one task to book appointment'),'type':'error'});
    }
}