What are predefined objects in client script?

theBeastMaster
Mega Guru

What are predefined objects in client script?

1 ACCEPTED SOLUTION

Not applicable

Hi

there are multiple objects that you can use in client script.

 

1. g_user - to get user information

 

2. g_form -   to get field information

 

3. g_list   -   to get list objects

 

4. g_menu is the UI Context Menu that is about to be shown. The onShow script can make changes to the appearance of the menu before it is displayed using these methods

 

5.g_item is the current UI Context Menu item that is about to be shown. It is used in several of the g_menu methods to specify an item.

 

Check below link for more details

 

Client Scripts - ServiceNow Wiki

Client Script Best Practices - ServiceNow Wiki  

View solution in original post

3 REPLIES 3

Bhawana Upreti
Tera Guru

Hi,

Please refer the given link.

 

Thanks.

shloke04
Kilo Patron

Hi,

 

Can you be more clear on what are you trying to understand regarding Client Scripts. For reference you may consult below docs:

 

https://docs.servicenow.com/bundle/kingston-application-development/page/script/client-scripts/concept/client-scripts.html

 

Cheers,

Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Not applicable

Hi

there are multiple objects that you can use in client script.

 

1. g_user - to get user information

 

2. g_form -   to get field information

 

3. g_list   -   to get list objects

 

4. g_menu is the UI Context Menu that is about to be shown. The onShow script can make changes to the appearance of the menu before it is displayed using these methods

 

5.g_item is the current UI Context Menu item that is about to be shown. It is used in several of the g_menu methods to specify an item.

 

Check below link for more details

 

Client Scripts - ServiceNow Wiki

Client Script Best Practices - ServiceNow Wiki