The correct answer is that gs.getUser() returns the current user running the script, not the intended approver. In ServiceNow, gs.getUser() retrieves the session user—the person who triggered the business rule—rather than the user who should receive the approval. When a business rule executes on the requested item table, the script runs under the context of the user making the change, so the approval record is incorrectly assigned to that triggering user instead of the proper approver. This concept is frequently tested on the CSA exam, often in questions where a script include or business rule misassigns records because developers confuse the script’s execution context with the record’s data. A common trap is assuming gs.getUser() always returns the intended target user, but it actually reflects who is logged in or running the script. To assign the correct approver, reference a field from the current record, such as current.approver or current.assigned_to. Memory tip: “gs.getUser() gets the user doing the work, not the user needing the approval.”
SNOW-CSA Self-Service and Automation Practice Question
This SNOW-CSA practice question tests your understanding of self-service and automation. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
Exhibit
Refer to the exhibit.
sys_script_include.js:
var ApprovalHelper = Class.create();
ApprovalHelper.prototype = {
initialize: function() {},
sendApproval: function(rec) {
var user = gs.getUser();
var gr = new GlideRecord('sysapproval_approver');
gr.initialize();
gr.sysapproval = rec.sys_id;
gr.approver = user.getID();
gr.insert();
}
};
A developer writes the script include above to create an approval record. When the method is called from a business rule on the requested item table, the approval is created but assigned to the wrong user. What is the most likely cause?
Clue words in this question
Noticing these words before you look at the options changes how you read each choice.
Clue: "most likely"
Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.
Refer to the exhibit.
sys_script_include.js:
var ApprovalHelper = Class.create();
ApprovalHelper.prototype = {
initialize: function() {},
sendApproval: function(rec) {
var user = gs.getUser();
var gr = new GlideRecord('sysapproval_approver');
gr.initialize();
gr.sysapproval = rec.sys_id;
gr.approver = user.getID();
gr.insert();
}
};
A
The method should use 'new GlideRecord' instead of 'var gr'
Why wrong: Variable declaration is fine.
B
The method uses gs.getUser() which returns the current user running the script, not the intended approver
In a business rule, the current user is often the system, not the actual requestor.
C
The method is not using the correct GlideRecord table name
Why wrong: The table name 'sysapproval_approver' is correct.
D
The method should call rec.update() after inserting the approval
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The method uses gs.getUser() which returns the current user running the script, not the intended approver
The script uses `gs.getUser()` to set the approver, which returns the user currently running the script (the system user or the user triggering the business rule), not the intended approver. In ServiceNow, `gs.getUser()` retrieves the session user, which in a business rule context is the user who triggered the rule, not necessarily the user who should approve the request. To assign the correct approver, the script should reference a field from the current record (e.g., `current.approver`) or use a specific user sys_id.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
✗
The method should use 'new GlideRecord' instead of 'var gr'
Why it's wrong here
Variable declaration is fine.
✓
The method uses gs.getUser() which returns the current user running the script, not the intended approver
Why this is correct
In a business rule, the current user is often the system, not the actual requestor.
Clue confirmation
The clue word "most likely" in the question point toward this answer.
Related concept
Read the scenario before looking for a memorised answer.
✗
The method is not using the correct GlideRecord table name
Why it's wrong here
The table name 'sysapproval_approver' is correct.
✗
The method should call rec.update() after inserting the approval
Why it's wrong here
Not needed for the approval record.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates assume `gs.getUser()` always returns the 'user' they think of as the approver, but in ServiceNow it returns the user running the script, which in a business rule is the user who triggered the rule, not the intended approval target.
Detailed technical explanation
How to think about this question
`gs.getUser()` returns a GlideUser object representing the current session user, which in a business rule is the user who triggered the rule (e.g., the end user submitting a request). The intended approver is typically stored in a field on the requested item record, such as `assigned_to` or a custom approval field. Under the hood, `gs.getUser().getID()` returns the sys_id of the session user, which is why the approval is assigned to the wrong person. A common pattern is to use `current.variables.approver` or `current.approver` to dynamically set the approver based on the record data.
KKey Concepts to Remember
Read the scenario before looking for a memorised answer.
Find the constraint that changes the correct option.
Eliminate answers that are true in general but not in this case.
TExam Day Tips
→Watch for words such as best, first, most likely and least administrative effort.
→Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A practitioner preparing for the SNOW-CSA exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.
What to study next
Got this wrong? Here's your next step.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Self-Service and Automation — This question tests Self-Service and Automation — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: The method uses gs.getUser() which returns the current user running the script, not the intended approver — The script uses `gs.getUser()` to set the approver, which returns the user currently running the script (the system user or the user triggering the business rule), not the intended approver. In ServiceNow, `gs.getUser()` retrieves the session user, which in a business rule context is the user who triggered the rule, not necessarily the user who should approve the request. To assign the correct approver, the script should reference a field from the current record (e.g., `current.approver`) or use a specific user sys_id.
What should I do if I get this SNOW-CSA question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Are there clue words in this question I should notice?
Yes — watch for: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
This SNOW-CSA practice question is part of Courseiva's free ServiceNow certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SNOW-CSA exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.