ServiceNow Notification and ACL Interview Questions and Answer

may13
Tera Contributor

                                                               Notification

 

How many ways notification can be triggered?

  • It can be configured to trigger on insert/update of the record.
  • It can be triggered through server side script by using gs.eventQueue method.
  • Through Flow Designer.

How to call email script in notification?

  • In notification what it will contain section, add below line.

               ${mail_script:EmailScriptName}

How to add cc in email notification?

  • email.addAddress("cc","email_address_of_the_user","Name_of_ther_user");

What is the use of email template and how to trigger a template from script?

  • Email templates can be used to create reuse-able content for the subject line and body of email notification.

How exactly trigger an event from system.

  • The code to trigger an event via script.

What is the use of parm1 and parm2?

  • Parm 1 and parm 2 are two input parameters which can be tagged with an event whenever it is triggered.

What is the use of weight option in email notification?

  • Email notification weight is defined as a required numerical value for this notification's priority relative to other notifications: With the same target table and recipients. The system only sends the notification with the highest weight.

How to schedule notification to trigger at particular date and time and what are the notification related objects we can access in email script?

  • We can schedule notification by using gs.eventQueueScheduled method.
  • It accepts parameters as shown below, gs.eventQueueScheduled('event_name',current,'parm1','parm2',DateTime object);

 

                                           ACL (Access Control List)

 

Definition-

  • An access control is a security rule defined to restrict the permissions of a user from viewing and interacting with data.
  • To create or edit ACL rules, you must elevate privileges to the security_admin role.
  • Table name of ACL is sys_security_acl

 What is admin overrides checkbox in ACL

  • If admin overrides checkbox is selected that means admin has permission to changes in ACL

Types of ACL in ServiceNow:

  • Row level ACL :
  • Row level ACL is when we use like table.none or anytablename.none . Where none says that it is not targeting specific to any field.
  • Field Level ACL :
  • In field level ACL we provide field name where we want to implement operations (create, read, write, delete). For e.g. incident.assigned_to

Difference between table.none and table.* in ACL:

  • table.none
  • table.none is table level (Row Level)acl                                    - 
  • Which allows you to access records.
  • table.*
  • table.* is field level acl
  • Which gives Access to all field on that table

What is mean by * dot *

  •  *.* represents = all records in all tables.all fields in a record

Execution order of ACL

  • The sequence is ROLES first, then condition, then script. Roles are cached so it's always more efficient to use roles whenever possible.
1 REPLY 1

GlideFather
Tera Patron

Hi @may13,

 

I’d like to follow up on how the wildcard (table.*) option works.

 

The wildcard indeed applies to fields, but only to those that haven’t been explicitly defined in another ACL record.

 

For example:

  • Table A has 7 fields. If you set an ACL for just one field, like tableA.short_description, then tableA.* will automatically apply to the remaining 6 fields (7 without short_description).
  • Table B has 5 fields. If you define ACLs for short_description, number, and category, then tableB.* will apply on the last 2 fields only. (5 without short_description, number, category)
  • Table C has 9 fielde, If you apply tableC.* without specifying any other individual field,  then the wildcard applies to all 9.

I think it’s important to clearly understand how the wildcard behaves depending on what’s already defined. Especially for interview purposes. Does that make sense?  

———
/* If my response wasn’t a total disaster ↙️ drop a Kudos or Accept as Solution ↘️ Cheers! */