Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

what is 'showServiceType'?

Ankita9793
Tera Contributor

Hi All,

 

Can someone please help me understand what is 'showServiceType.showTheFields', is it a OOB Glide form method? If it is a custom method, how and where can i check the definition? 

 

 var hideforhkg = ['extension_number_amendment_for','display_name_of_the_extension_needs_changing','class_of_service','profile_hongkong','change_required_to_the_voicemail_account','gm_user','change_required_to_a_multi_line_setup_example_manager_secretary','please_detail_the_change_multi_line_setup','change_required_to_a_pickup_group','sample_staff_id_extension_id_pickup','sample_staff_id_for_pickup_group','is_a_change_required_to_a_hunt_group','enter_sample_staff_id_extension_id_hunt_group','sample_staff_id_for_hunt_group','do_you_require_a_change_to_call_forwards','extension_calls_to_be_forwarded_to','call_recording_limited_by_business_requirement'];

     
    if (location == 'HKG'){
    if(standardTelephone  == 'true' && ext_china == 'No') {
        g_form.showServiceType.showTheFields(hideforhkg);
    }
2 REPLIES 2

J Siva
Kilo Patron
Kilo Patron

Hi @Ankita9793 
As per the official doc GlideForm (g_form)
showServiceType is not OOB method. Also, we can't add any new methods to the g_form class.
Regards,
Siva

Shraddha Kadam
Giga Sage

Hello @Ankita9793 ,

 

As per my knowledge, showServiceType.showTheFields' is not an Out-of-the-Box (OOB) Glide form method. The standard g_form object in ServiceNow has methods like setVisible(), setReadOnly(), setMandatory(), hideRelatedList(), etc., but not a nested structure like showServiceType.showTheFields.

 

This indicates that It showServiceType.showTheFields is a custom method.

 

Below is the helpful article -

https://www.servicenow.com/community/itsm-articles/glide-form-methods-in-servicenow/ta-p/2788713

 

 

If my response was helpful, please mark it as correct and helpful.
Thank you.