Client logic improves form interaction; server logic enforces trusted rules. Users and integrations can bypass ordinary browser form behavior.
Before you start
You should understand tables, records and the difference between client-side and server-side scripts. Work in a development instance with representative permissions. Identify execution scope, transaction timing and the current user before attributing behavior to a platform script or business rule.
The practical goal is to reason through this situation: A client script shows guidance while server validation enforces the required relationship. Read the walkthrough first, then try the interview exercise before opening its answer. The important part is explaining the decision and its consequences, rather than remembering a definition alone.
Step-by-step walkthrough
Step 1: Improve form interaction
Client guidance can make required relationships understandable.
Step 2: Enforce trusted rules
Server-side or appropriate data-policy enforcement must cover supported write paths.
Step 3: Test non-form writers
Imports and APIs may bypass ordinary client scripts.
Worked scenario
A client script shows guidance while server validation enforces the required relationship.
A browser marks a justification mandatory, but an integration inserts the record without one. The form rule alone did not establish the data invariant. Choose platform enforcement that covers the required paths and test exceptions deliberately, rather than assuming the browser is the only record producer.
Common mistake
Making a field mandatory only in a client script does not protect every write path.
Verify the behavior
Submit through form, API and import under representative permissions.
Interview exercise
Enforce a required business field.
Answer and reasoning
Use the platform’s suitable server or data-policy mechanism and verify API, import and form behavior.
Continue learning
Compare the scenario with the ServiceNow interview questions and test your understanding with the ServiceNow MCQs. For terminology and implementation details, consult the reference material.