A company has a custom table 'u_employee_data' with a before query business rule that sets 'u_department' to 'Engineering' when the current user is in the 'ITIL' role. After the business rule is activated, users in the 'ITIL' role report that when they query the table, they see only records with department 'Engineering'. However, the business rule is intended to set the default department for new records only. What is the most likely cause?
Trap 1: The business rule should be set to 'async' to avoid affecting…
Async would not change the behavior; the rule would still apply to queries.
Trap 2: The business rule is set to run on the client side instead of…
Business rules run server-side by default.
Trap 3: The condition script uses 'gs.getUser().hasRole("ITIL")'…
This is a standard way to check role, so it's likely correct.
- A
The business rule should be set to 'async' to avoid affecting queries.
Why wrong: Async would not change the behavior; the rule would still apply to queries.
- B
The business rule is set to run on the client side instead of server side.
Why wrong: Business rules run server-side by default.
- C
The business rule is running on 'before query' instead of 'before insert'.
Before query modifies the query for all retrievals, not just new records.
- D
The condition script uses 'gs.getUser().hasRole("ITIL")' incorrectly.
Why wrong: This is a standard way to check role, so it's likely correct.