classes and methods

Community Alums
Not applicable

When we click period(.) just next to objects(g_form, g_user....), we can see the methods of particular object and icons (F,S,O) in front them, what those icons refer to and why they are not same ?

 

find_real_file.png

1 ACCEPTED SOLUTION

SumanthDosapati
Mega Sage
Mega Sage

Hi,

@Khasim Pathan 

If it's 'F'  then it is a function and it needs to be having braces () so that it can accept any parameters if needed.
Example : g_form.getValue('field_name');

 

If it's 'S'   then it is not a function and returns a String. It do not need these brackets(). We cannot pass any parameters.
Example : g_user.first_name;

 

Mark as correct and helpful if it solved your query.

Regards,
Sumanth

View solution in original post

3 REPLIES 3

Jaspal Singh
Mega Patron
Mega Patron

Hi,

Not sure but just a guess for me 'F' seems to be Function while 'S' seems variable/field's dictionary.

Harish KM
Kilo Patron
Kilo Patron

Those are scripting Assistance.It provides a contextual list of available properties and methods for script objects

https://developer.servicenow.com/dev.do#!/learn/courses/quebec/app_store_learnv2_scripting_quebec_scripting_in_servicenow/app_store_learnv2_scripting_quebec_introduction_to_scripting_in_servicenow/app_store_learnv2_scripting_quebec_servicenow_script_editor

Regards
Harish

SumanthDosapati
Mega Sage
Mega Sage

Hi,

@Khasim Pathan 

If it's 'F'  then it is a function and it needs to be having braces () so that it can accept any parameters if needed.
Example : g_form.getValue('field_name');

 

If it's 'S'   then it is not a function and returns a String. It do not need these brackets(). We cannot pass any parameters.
Example : g_user.first_name;

 

Mark as correct and helpful if it solved your query.

Regards,
Sumanth