Category: Interview Questions
Updated on: September 29, 2025  |  0

Interview Questions GRIND 12

πŸš€ ServiceNow Interview Questions Grind


❓ Q35: What do you mean by Coalesce?

πŸ‘‰ Answer:
Coalesce is a property used in Transform Map field mapping.

πŸ“Œ How it works:

  • If Coalesce = true, the field acts as a unique key.

  • When importing data:

    • If a match is found β†’ the existing record is updated.

    • If no match β†’ a new record is created.

πŸ’‘ Pro Tip: Always choose fields like sys_id or other unique identifiers as coalesce fields to avoid duplicates.


❓ Q36: What are UI Actions?

πŸ‘‰ Answer:
UI Actions allow you to create buttons, links, or context menu items on forms and lists.

πŸ“Œ Use cases:

  • Run a script

  • Redirect users

  • Trigger workflows

  • Automate tasks with one click


❓ Q37: What kind of scripts can we write in UI Actions?

πŸ‘‰ Answer:
UI Actions support both Client-side and Server-side scripts.

  • πŸ–₯️ Client-side β†’ Check the Client box β†’ Use an onClick function.
    Example:

    Β 
    function onClickFunction() { alert("Client-side UI Action executed!"); }
  • βš™οΈ Server-side β†’ Write logic directly in the UI Action script field.
    Example:

    Β 
    current.state = 3; current.update();

πŸ“Œ Pro Tip: If your logic needs database operations β†’ use Server-side. If it’s form manipulation β†’ use Client-side.


❓ Q38: What are UI Policies?

πŸ‘‰ Answer:
UI Policies are alternatives to Client Scripts that allow you to dynamically change form behavior.

πŸ“Œ You can:

  • Make fields mandatory

  • Set fields read-only

  • Show/Hide fields

πŸ’‘ Pro Tip: Always prefer UI Policies over Client Scripts for simple form logic because they are easier to maintain.


❓ Q39: Can we do scripting in UI Policies?

πŸ‘‰ Answer:
βœ… Yes.
When you tick the Advanced checkbox, you get a script field where you can write client-side code.

πŸ“Œ Example:

Β 
g_form.setMandatory('short_description', true); g_form.setVisible('priority', false); g_form.setReadOnly('caller_id', true);

❓ Q40: What is a Data Policy?

πŸ‘‰ Answer:
A Data Policy enforces field requirements (mandatory, read-only) at the server-side level.

πŸ“Œ Key Difference vs UI Policy:

  • UI Policy β†’ Enforces rules in the form (client-side).

  • Data Policy β†’ Enforces rules during record insertion/update from web services, imports, or other integrations.

πŸ“Œ Example:
If a mandatory field is empty in an import set β†’ Data Policy will block the insert/update.

Comments

No comments yet.


Log in to post a comment