nerdexam
ServiceNow

CAD · Question #45

In a Business Rule, which one of the following returns the sys_id of the currently logged in user?

The correct answer is D. gs.getUserID(). This question asks for the correct method within a server-side Business Rule to retrieve the sys_id of the current user.

Submitted by joshua94· Apr 18, 2026Application Automation

Question

In a Business Rule, which one of the following returns the sys_id of the currently logged in user?

Options

  • Ag_form getUserID()
  • Bg_form getUserSysy
  • Cgs.getUserSysID()
  • Dgs.getUserID()

How the community answered

(45 responses)
  • A
    7% (3)
  • B
    2% (1)
  • C
    2% (1)
  • D
    89% (40)

Why each option

This question asks for the correct method within a server-side Business Rule to retrieve the sys_id of the current user.

Ag_form getUserID()

`g_form` is a client-side API, not available in server-side Business Rules, and `getUserID()` on `g_form` typically returns the user's login ID, not sys_id.

Bg_form getUserSysy

`g_form` is a client-side API, not available in server-side Business Rules, and `getUserSysy` is not a valid method.

Cgs.getUserSysID()

`gs.getUserSysID()` is not a standard GlideSystem method for retrieving the user's sys_id; `gs.getUserID()` serves this purpose.

Dgs.getUserID()Correct

In a server-side script like a Business Rule, `gs.getUserID()` is the correct GlideSystem method to return the sys_id of the currently logged-in user.

Concept tested: Server-side user identification (sys_id)

Source: https://docs.servicenow.com/bundle/utah-application-development/page/script/server-scripting/reference/r_GlideSystemAPI.html

Topics

#Business Rules#Server-side scripting#GlideSystem#User identification

Community Discussion

No community discussion yet for this question.

Full CAD Practice