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

SP22
Giga Sage

Hello @DwarkamaiH,

  • g_user.UserName()  Not valid. The correct property is g_user.userName (lowercase “u” and not a method).
  • g_user.HasMultipleRoles  Not valid. There is no such method or property in the GlideUser API.

    Thanks
    SP

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:

Tamizhv
Tera Contributor

UserName() -  Wrong Method

HasMultipleRoles - Not a GlideUser method at all.

 

Please select both the option 2

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards

 

 

GlideFather
Tera Patron

Hi @DwarkamaiH,

 

the best way to learn is to search by yourself rather than to ask strangers online and memorise what they say... trust in yourself more than in others!

 

To see the correct answer, refer to this GlideUser - Client 

_____
100 % GlideFather experience and 0 % generative AI