Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

Urgent Exam Preps -CAD

DwarkamaiH
Giga Contributor

Which one of the following is NOT a GlideUser API (g_user) method ? 

getFullName(),

hasRoleExactly(),

hasRole(),

UserName(),

HasMultipleRoles

what will be the answer if select only 1 or select 2

1 ACCEPTED SOLUTION

Tanushree Maiti
Tera Sage
  • If you must select ONLY 1:
    • HasMultipleRoles 
  • If you must select 2:
    • UserName()
    • HasMultipleRoles 
Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

View solution in original post

8 REPLIES 8

NACHIKETAK
Tera Contributor
  • UserName() (should be getUserName())
  • HasMultipleRoles (no such method)

PoonkodiS
Giga Sage

Hi @DwarkamaiH 

 
 

HasMutipleRoles is not available in Glideuser Api

 

Regards,

Poonkodi

 
 
 
 
 
 

 

PoonkodiS
Giga Sage

var formalName = g_user.getFullName();

var isItil = g_user.hasRole('itil');

var isInternal = g_user.hasRoleExactly('snc_internal', true);

var userName = g_user.userName;
alert('Current user = ' + userName);

soumyadeep10
Tera Guru

1. UserName() is invalid.

2. HasMultipleRoles() is invalid.

 

************************************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.