Professional Documents
Culture Documents
What is plugins ?
What is view ?
How to move the update set from Dev to Test and Prod ?
There are two update sets A and B, I have captured few customizations A and
B by mistake I capture few customizations in B instated of A, now I want to
move this customizations from Update set B to Update set A? How will you do
that ?
What are the best parties while capturing the update sets ?
While loading the incident form I want to get the users id in alert box how will
you achieve this ?
While changing the any fields on the table and save the form I want get the
confirmation alert ?
box these are fields are changes do you want save ok or cancel?
While loading the incident form I want to get the Current logged in users Id
role and in alert box . How you will achieve this ?
What is difference between script include and Global business rules and which
one you will prefer?
Service Catalogs
Service catalogs provide a customer-facing view of available service and product offerings
provided by departments within the organization. This allows organizations to promote these
offerings in a structured and easily navigatable way, and encourages customers to access
catalogs to serve their own needs. navigate to Self-Service > Service Catalog
A service catalog enables customers to view and order items from departments within
your organization. These catalog items can include goods, services, and information.
Anything that can be ordered individually can be ordered as a catalog item. Anything that only
exists as a part of a larger whole cannot be a catalog item. For example, a laptop can be a
catalog item, but a high-resolution display for a laptop cannot.
Q). What is Maintain Item ? Catalog items are goods or services that are available to
order from a service catalog. Administrators and catalog administrators can define catalog items,
with details such as formatted descriptions, photos, and prices.
Maintain Items: Create and edit catalog items, the actual goods or services available to
order from a catalog. Service Catalog > Catalog Definition > Maintain Items > NEW .
Q). What are the base tables or when request is raised what are the
table will be create?
Q). What are the types/Categories of Service Catalogs ?
Types of Service Catalog : Record Producer, Order Guide, Normal Catalog Item.
Q). What is Order guides ? -- Order guides enable customers to make a single
service catalog request that generates several items. ... The order guide then submits an order for
catalog items like business cards, based on the details provided. ... Order guides determine which
catalog items to order by evaluating order guide rule conditions. ... Administrators and catalog
administrators can create order guides for the service catalog. ... Order guides can be run
automatically, generating a set of ordered items without needing to manually submit a service
catalog request .
Order Guides: Create and edit standard groups of related items, allowing end users to
easily order these items in one request. For example, define a New Hire Equipment order
guide.
Q). What is Record Procedure and how to declare the variable ?
Record Producers: Enable records to be created directly from the service catalog. For
example, allow customers to raise incidents from the service catalog.
Catalog Client Scripts: Define dynamic effects and validation to items or variable sets.
Catalog UI Policies: Define the appearance and behavior of fields. For example, make it
mandatory for anyone
Q). What is variable sets ? Variable sets allow you to group variables together, and
share this group between multiple catalog items and order guides. Changes made to a variable
set affect all items that use the variable set, allowing you to change the set once, then apply the
changes to all items using that set.
A service catalog variable provides the ability to capture and pass on information about choices a
customer makes when ordering a catalog item. Some variables can be defined to affect the order
price, depending on the selected value.
For example, a New PC catalog item can use a variable called "Memory", which provides
choices to allow customers to select extra memory, for associated extra prices.
Variables can be stored, accessed from multiple places, and passed between tasks in a process
when fulfilling a request.
Variables can be displayed on the Requested Item and Catalog Task forms after an item has
been ordered. Variables can also be associated with variable sets and re-used across multiple
catalog items.
Q). What is catalog task and Task ?
The Catalog Task activity creates a service catalog task record.A user must complete the catalog
task. This activity is available only for workflows running on the Catalog Request Item
[sc_req_item] table.
Q).In order guide what is Rule base ?
Transform maps
Q). What are the Activities in work flow ? Workflow activity is a workflow block
that organizes the individual actions the workflow performs as it runs.
Q). What are the tables in work flow ? For full flexibility, workflows store information
over a number of different tables. Usually these tables are not interacted with one-by-one; rather,
use the Workflow Editor to edit workflows. The following lists are provided for reference
purposes.
Chek Out :- Means if any changes made to the workflow those are reflected on
the workflow when it is checked out. When the workflow was checked out.
Automatically set by the Checkout action in the workflow menu.
The user who has this workflow checked out. This value is automatically
set by the Checkout action in the workflow menu
Only one copy of a workflow version can be checked out at any time. If
you are unable to check out a workflow, check to make sure another
user hasn't already checked it out.
checked-out workflows run as the latest version for the user who has it checked-out
The Wait for condition activity causes the workflow to wait at this activity until the current
record matches the specified condition. ... The workflow evaluates
the Wait for condition activity each time the current record is updated. ... Note:
A Wait for condition activity should only be used towait for an external event such as a
record update, and not one from a workflow setting a value. ... Wait for condition activity input
variables Field Description Condition The workflow is paused at this activity until this condition
matches the current record. ... Wait for condition activity states State Description Executing
The workflow engine knows to start the onExecute function of the activity.
Q) What is timer activity ? The Timer activity pauses the workflow for a specified
period of time. ... Timer activity results Result Description Complete The activity successfully
reached the specified duration. ... Timer activity input variables Field Description Timer based on
How the timer duration is computed. ... Timer activitystates State Description Executing
The Timer activity is in this state very briefly while initializing, after which it immediately changes
to Waiting . ... Example You can use a Timer activity to pause the workflow until the end of the
business day.
The Rollback activity transitions to an earlier activity and updates all approvals and tasks
executed after that point. ... Approvals are reset to Not Requested and tasks are
reset to Open . ... Rollback updates all activities that have executed between
the rollback and the transitioned to activity, including those not directly joined by transition
lines. ... Use the Rollback To activity instead. ... Comment This comment is written to the
Comment field in the current task and is typically used to indicate that a rollback has
occurred.
I want generate the two task from work flow while raiding the request ?
The Run Script activity runs any script.. Use the Run Script template to create an activity
that runs any script .
Q). Orchestration extends the workflow engine to manage human processes and to automate
things outside of a ServiceNow instance.
The OLA's and UP's have to be in line with the SLA, which has to be fulfilled. Cause the OLA's
and UP's ensures that your customer get's the agreed service and value add by having a
partnership with your company.
Q). What are the condition in SLAs ? You can set four SLA conditions: start, pause,
stop, reset.
Start condition Enables you to define the conditions under which the SLA will be
attached. If one or more of the specified start conditions change, then the SLA will be
canceled.
Select Retroactive start to choose a date and time field from the task that will
provide the start time of the task SLA. If you select theRetroactive
start check box, the Set start to field appears offering the date and time
fields available on the task type that this SLA definition applies to. For
example if you select Retroactive start on a Priority 1 SLA definition and then
choose Created in the Set start to field, then the SLA is attached with the
start time being the date and time from the Created field on the Incident.
Pause condition Enables you to define the conditions under which the SLA will
suspend increasing elapsed time. If one or more of these conditions no longer
match, then the elapsed time will continue to increase.
Stop condition Enables you to define the conditions under which the SLA
completes. If all of the specified stop conditions match, then the task SLA will
complete regardless of whether it is breached.
Reset condition Enables you to define the conditions under which the running SLA
will be completed and a new SLA will be attached. For a new SLA to be attached,
the start condition must match.
Q). How to stop,Pause and cancel the SLA ?
start conditions: active is true and priority is high , or Status is NOT pending change
or Status is NOT pending problem .
Stop conditions: would be assignment group is NOT empty , or assigned to is not empty
and status is work in progress , or status is resolved or status is closed .
However, I didn't include all of my "pending" type status as negative conditions, so therefore,
I would have an incident that would get created and it would sit in a "new" status. So the
response time SLA would fire and the clock would be running. As soon as the assigned to
field or the assignment group field and status field were updated (i.e. the ticket gets assigned
to a group or person AND the status would change to work in progress) the SLA would be
achieved (if it was within it's defined time frame). However, as soon as someone would put
that ticket into a "pending" status, the Response time SLA would fire again.
Primary SLA
--------------------------
Start Condition - You already have this set
Stop condition - State is one of Closed/Cancelled(or any other similar state you may have)
Second SLA
-------------------------
Start Condition :- Assignment Group is XYZ and
Priority is P4
Pause :- Assignment Group is not XYZ
OR
Priority is not P4
OR
State is one of Pending change, Pending Vendor, Resolved
Stop :- State is one of Closed/Cancelled
Q). If I didn t provided the Duration type in SLA what will happen ?
The SLA duration will work in conjunction with the SLA schedule.
If a schedule is not selected for an SLA, the SLA will run 24X7.
This impact is reflected in the timings that are taken into consideration while calculating an
SLA. Consider a scenario where you select a duration of one day, which is 24 hours, and
a schedule of 9 am to 5 pm, which is 8 hours. The SLA calculation will distribute the 24
hours across three working days of 8 hours each. So a team working on a task
associated with this SLA has 3 days to complete the task before the SLA is breached.
You can select one of two SLA durations types to define the length of time within which a
task must be completed before the SLA is breached. If an SLA schedule is defined, the
duration works in conjunction with the schedule.
When you define an SLA, you can select either a user specified duration or a relative
duration.
User specified duration
Specifies a static duration period, such as 8 hours, often in conjunction with a
business schedule.
Relative duration
Specifies a duration relative to the start time of the task SLA and is defined
using a script. For example, you can select a relative duration such as End of
next business day or Next business day by 4pm.
Q) . What is Retroactive start ?
You can use retroactive start to retain the timing information for an SLA when a task record
changes. About this task
When a task record changes, typically a new SLA may be attached, with a new set of timing
information. This is useful if you are re-assigning an incident to another group and want to attach a
new SLA record with new timing information.
However, you may want to retain the task's time information in specific situations. For example, an
incident is raised with a priority of 3 - Moderate and the priority changes to 1 - Critical after 3
hours. A priority 1 SLA is attached to the incident at that time. You can use retroactive start to
ensure this SLA timing is adjusted retroactively to count from when the incident was first created,
rather than from when the incident's priority changed. This reflects the actual time the user
contacted you.
Note: When retroactive start is enabled, it may result in task SLAs being breached as soon
they attach, which will trigger multiple notifications. To prevent the workflow from being
processed for these breached SLAs, set the com.snc.sla.workflow.run_for_breached
property to false.
Q). I want to send notification if SLA has breached 50% r 75% r 100% how will
you achieve?
Q). Email Notifications : Use email notifications to send selected users email about
specific activities in the system, such as updates to incidents or change requests. If you want to
change how the system processes incoming email, see Inbound Email Actions.
Events may exist in one of several states: Ready, Processed, Error, Transferred .
The following sample script adds a request.commented event with the user's Sys ID as parm1
and the user's user name for parm2.
if (current.operation() != insert && current.comments.changes()) {
gs.eventQueue(request.commented, current, gs.getUserID(),
gs.getUserName());
}
ACLs
Q).What is ACL ? An instance uses access control list (ACL) rules, also called access
control rules, to control what data users can access and how they can access it. ACL rules
require users to pass a set of requirements in order to gain access to particular data. Each ACL
rule specifies:
Debug ACL rules to determine why users cannot access certain objects
I'm trying to make every field on the cmn_location table form read only for all users except I want
just the users who are members of about 4 different groups to be able to update 2 of the fields
I've added to the table. For each of those groups I have a group specific role available. OOB the
ACL's already there allow users with the role of user_admin to write to the table.
Table name: the table being secured. If other tables extend from this table, then the table is
considered a parent table. ACL rules for parent tables apply to any table that extends the
parent table.
Field name: the field being secured. Some fields are part of multiple tables because of table
extension. ACL rules for fields in a parent table apply to any table that extends the parent
table.
Adding the group roles easily gives the group members write access to the table but doesn't
restrict all fields except the two I want them to be able to update.
Where are you adding the roles? Are you adding them to a table write ACL or to an ACL for each
of the two fields that you need to modify the access for?
Is there a reason you are using the pre-existing group-based ACLs? You'd probably be happier
in the long run with adding a more specific ACL (cmn_location_editor or something like that) and
adding that role to all of the groups or roles that you want to grant the permission to. It's a lot
easier to see where the permissions are going that way, IMHO. Greater expertise is welcome to
chime in here. The read ACL already allows any user logged in to read the fields.
Check -- If I simply write a new field level ACL for the fields I want write access to and add the
roles I want to be able to write to those fields the users do not get write access to any field on the
table.
I think this is your problem right here. We need to dig into what's going wrong with the two field-
level ACLs you wrote for the fields you want to grant permission to. How complex are your two
field-specific ACLs? If all you want to do is add editing permission for those roles, that should be
the only part of the ACL that's filled out; no conditions or scripts necessary. If you add a script or
a condition, the evaulation is AND, not OR; that is, ALL of the three (role, condition, script) must
be true for the ACL to return true.
Are ACLs the best approach here? Do I need to create a field level ACL for every field
specifically?
Yes, ACLs are the right way to go. In fact, I'm not certain that there is another (reasonable and
non-destructive) way to do it.
The only fields you need to create an ACL for are the ones that you want MORE SPECIFIC
access controls on. There's a great charthere that can really shed some light; when I had a
particularly complex set of ACLs to juggle I printed the darn thing. It boils down to this:
ServiceNow will always look for more specific rules before it looks for more general rules.
First it's going to look for table_name.field_name permissions. If it finds those, it evaluates the
permissions against this rule (or set of rules). This more specific rule overrides any other rules
(coding formatting to preserve asterisks, because I can't reddit):
table_name.field_name > table_name.* > table_name > *.* > *
For your fields that you don't want to change the permissions on, you should not need to make
any changes to the ACL. They'll look for table_field.field_name, not find it, and fall right through
to the correct permissions. You should only need to make ACLs for the two fields you need to be
able to modify. tl;dr
Yes, ACLs are the way to go here. They are able to do what you need them to (as described).
Only add new write ACLs for the fields you want to change the behavior of.
Consider using ONE role for the table and adding it to the roles you want to have that access.
I think the best way to handle this situation would be to do this:
1. You have to allow those groups to write to the table, first and foremost. Any field level ACLs are
going to get ignored if you fail a table ACL. Edit the cmn_location/write table ACL to check for
memberships in those groups. Remove any roles in the role list. If you want to still check for
specific roles, you can add a check for that in the script. The script would look like this:
var user = gs.getUser();answer = user.isMemberOf('group_name1') ||
user.isMemberOf('group_name2') || user.isMemberOf('group_name3') ||
gs.hasRole('user_admin');
2. Create 2 new ACLs for the 2 fields, and use the script field on each to check those group
memberships like you did in step 1. If you stopped right here, those groups' members would
have access to all the fields in cmn_location. Since you only want them to have write access to
specific fields, you have to deny access to the rest of the fields (step 3).
3. Use a cmn_location.*/write ACL to deny write access all fields in the table (say "answer = false"
in the script field). This will get overruled by the field level ACLs you create in step 3.
The result is this: if you have the right group memberships, you pass the field level ACL, and
table ACL, which grants access. If you don't have the right memberships, the table rule is going
to deny write access, period.
It's important to remember that if a field level ACL grants access, but the table ACL denies, then
the result is a DENY. Likewise, granting write access at the table level will grant access to all
fields in the absence of a field level ACL or a wilcard ACL.
The preferred method of assigning roles to users is to add users to groups that have been
assigned the desired roles. When you assign a user to a group, the user inherits that group's
roles. When you remove a user from a group, the group roles are revoked for that user. This
method makes managing roles much easier than assigning roles to individual users.
A group is a set of users who share a common purpose. Groups may perform tasks such as
approving change requests, resolving incidents, receiving email notifications, or performing work
order tasks. Any business rules, assignment rules, system roles, or attributes that refer to the
group apply to all group members automatically. Users with the user_admin role can create and
edit groups. Creating the Group as follows .
Q). What do you understand about Glide Record ?, Explain use of it ? How do you find
total number of records in a problem table using Glide Record?
GlideRecord is a special Java class (GlideRecord.java) that can be used in JavaScript exactly as
if it was a native JavaScript class.
GlideRecord is an object that contains zero or more records from one table. Another way to say
this is that a GlideRecord is an ordered list.
A GlideRecord contains both records (rows) and fields (columns). The field names are the same
as the underlying database column names.
Q). What is Glide Element ? Explain usage of it ?
GlideElement provides a number of convenient script methods for dealing with fields and
their values. GlideElement methods are available for the fields of the current GlideRecord.
The GlideSystem (referred to by the variable name 'gs' in Business Rules) provides a
number of convenient methods to get information about the system, the current logged in
user, etc. For example, the method addInfoMessage() permits communication with the user.
Many of the GlideSystem methods facilitate the easy inclusion of dates in query ranges and are
most often used in filters and reporting.
Q). How do you insert data into a table using Glide Record ? Explain the syntax
var rec = new GlideRecord('incident');
rec.initialize();
rec.short_description = 'Network problem';
rec.caller_id.setDisplayValue('Joe Employee');
rec.insert();
Q). Explain how do you perform a deletion on a specific table, specific row using Glide
Record ? var rec = new GlideRecord('incident');
rec.addQuery('active',false);
rec.query();
while (rec.next()) {
gs.print('Inactive incident ' + rec.number + ' deleted');
rec.deleteRecord();
}
Q). glide list A field defined as a glide list is an array of values stored in a single field.
Here are some examples of how to process a glide_list field when writing business rules.
Generally a glide_list field contains a list of reference values to other tables.
Examples: For example, the Watch list field within tasks is a glide_list containing
references to user records. The code below shows how to reference the field.
You can also get the display values associated with the reference values by using the
getDisplayValue() method as shown below.
Note: For a script example of how to edit a glide list, see Add All Email Recipients to Watch List.
The task record has been created or updated. Assignment rules do not apply to unsaved
changes on a form.
The task record must be unassigned. The record cannot have an existing value for either
the assigned_to or assignment_group fields. Assignment rules cannot overwrite existing
assignments (including assignments set by a default value or a previously run assignment
rule).
The assignment rule is the first rule that matches the table and conditions. If more than one
assignment rule matches the conditions, only the rule with the lowest order value runs.
Dot-walking provides access to fields on related tables from a form, list, or script. If
the current table contains a reference to another table, any field on the referenced table
can be accessed using dot-walking.
1) what is the difference between the glide record and glide Ajax ?
Glideajax is used for call include script
Gliderecord used for get data from tables.
If you write gliderecord in client script it will effect performance issue becuase we
are getting data from database.
In that case we can use Glideajax to call includescript . In includescript we can
write gliderecord and return data to client script. It would be faster.
GlideAjax :
GlideAjax class allows the execution of server-side code from the client. GlideAjax
calls pass parameters to the script includes, and, using naming conventions, allows the
use of these parameters.
GlideRecord :- Is a Java Class that is used for database operations instead of writing SQL queries.
is an object that contains zero or more records from one table. Another way to say this is that a
GlideRecord is an ordered list.
GlideAjax in server side is useless.
GlideRecord in Client Side is limitted, so, in order to perform some "GlideRecord"
operations from client side, you should call a GlideAjax in order to run the GlideRecord
from the server properly, and allow to perform some operations.
Glide Ajax is best to be used at client Side to call script include, so that u can get data from server
side . Glide record is like Select in SQL , to fire a query we use glide record.
In Script include glide record is used.
Let's look into what both types are and their advantages and disadvantages.
Client-side Programming
ServiceNow Client scripts are Javascript that runs on the client-side (the user's web browser)
and instead of the server (on the server). Often it is used for immediate form changes, form
validation, or user input, and when limited database lookups are needed. The ServiceNow
Service Catalog often uses client side, "Catalog Client Scripts".
With the exception of the CellEdit client script, client scripts apply to forms only
Advantages
Disadvantages
No sequencing for client scripts running on same table
Can be more difficult to write than server-side programming such as business rules
Server-Side Programming
ServiceNow Server-side programming like business rules, is JavaScript configured to run when
a record is displayed, inserted, updated, deleted, or when a table is queried. Server scripts run
on the server or database.
ServiceNow uses server-side scripting in areas such as:
Advantages
Performance. When running code on the server, it often has a faster load time and
processing time than a client script
Can dot-walk many levels, however three levels is often a recommend maximum
Disadvantages
Not as interactive as client scripts, needs an event like save, delete, or display to run
They can change the appearance or behavior of ServiceNow or run as business rules
when records and tables are accessed or modified.
Server scripts run on the server or database.Server-side Glide APIs (Application
Programming Interfaces) provide classes and methods that you can use in scripts to
perform server-side tasks.
Business rules
A business rule is a server-side script that runs when a record is displayed, inserted,
updated, or deleted, or when a table is queried.
Script includes
Script includes are used to store JavaScript that runs on the server.
Script actions
You can use script actions to create server-side scripts that perform a variety of tasks,
such as modifying a configuration item (CI), or managing failed login attempts. Script
actions are triggered by events only.
UI pages
UI pages can be used to create and display forms, dialogs, lists and other UI
components.
UI Macros
UI macros define modular, reusable components in the ServiceNow platform. For
example, UI Macros are used to apply formatters to various forms within ServiceNow that
provide additional information about the form without using a field. This functionality
requires the knowledge of Jelly script.
A client script is a piece of JavaScript code that runs on the client, rather than the
server. Well-designed client scripts can reduce the amount of time it takes to complete a form.
However, improperly implemented client scripts can significantly slow down form load times. With
the exception of the CellEdit client script, client scripts apply to forms only .
A business rule is a server-side script that runs when a record is displayed, inserted,
updated, or deleted, or when a table is queried.
Use business rules to accomplish tasks like automatically changing values in form fields when
certain conditions are met, or to create events for email notifications and script actions.
Note: Business rules can make use of scripts to take actions on records in the database.
However, there are several other scripting options available on the platform, such as client
scripts and UI actions.
To configure business rules, you first need to determine when the business rule should
run and what action it should take.
When business rules run, Business rules run based on two sets of criteria:
The time that the business rule is configured to run relative to a record being modified or
accessed.
The following options are provided to determine the time the business rule should run:
Time the business rule should run
Option When the rule runs
Before After the user submits the form but before any action is taken on the record in
the database.
After After the user submits the form and after any action is taken on the record in the
database.
Async When the scheduler runs the scheduled job created from the business rule. The
system creates a scheduled job from the business rule after the user submits the
form and after any action is taken on the record in the database.
Display Before the form is presented to the user, just after the data is read from the
database.
Note: Asynchronous business rules do not have access to the previous version of a record.
Therefore, the changes(), changesTo(), and changesFrom() GlideElement methods do not work
with async rules.
The following options are provided to determine the database operation that the system takes on
the record:
Following are the Database operation that the system takes on the record
Option When the rule runs
Insert When the user creates a new record and the system inserts it into the database.
Update When the user modifies an existing record.
Query Before a query for a record or list of records is sent to the database. Typically you
should use query for before business rules. See Before-Query example.
Delete When the user deletes a record.
Note: Business rules apply consistently to records regardless of whether they are accessed
through forms, lists, or web services. This is one major difference between business rules and
client scripts, which apply only when the form is edited.
Business rules can perform a variety of actions. Common types of actions are:
Changing field values on a form that the user is updating. Field values can be set to specific
values available for that field, values copied from other fields, and relative values determined by
the user's role.
Aborting the current database transaction. For example, if certain conditions are met, prevent the
user from saving the record in the database.
Administrators can set field values, create information messages, and abort transactions without
writing a script. See Scripting in Business Rules for script examples.
Minimize Server Lookups
Client scripting uses either data available on the client or data retrieved from the server. Use
client data as much as possible to eliminate the need for time-consuming server lookups. The top
ways to get information from the server are g_scratchpad, and asynchronous GlideAjax lookup.
The primary difference between these methods is that g_scratchpad is sent once when a form
is loaded (information is pushed from the server to the client), whereas GlideAjax is dynamically
triggered when the client requests information from the server.
Other methods, GlideRecord and g_form.getReference() are also available for retrieving
server information. However, these methods are no longer recommended due to their
performance impact. Both methods retrieve all fields in the requested GlideRecord when most
cases only require one field.
The recommended method for preventing such unexpected behavior is to always wrap your code
in a function. This protects your variables from conflicting with system variables or global
variables in other business rules that are not wrapped in a function. Additionally, variables such
as current must be available when a function is invoked in order to be used.
This is an example of a script that is vulnerable to conflicts with other code. If the variable gr is
used in other rules, the value of the variable may unexpectedly change.
var gr = new GlideRecord('incident');
gr.query();
while (gr.next()) {
//do something
When this script is wrapped in a function, the variable is available only within the function and
does not conflict with other functions using a variable named gr.
myFunction();
function myFunction() {
var gr = new GlideRecord('incident');
gr.query();
while (gr.next()) {
//do something
}
}
-- Example: g_scratchpad
The g_scratchpad object passes information from the server to the client, such as when the
client requires information not available on the form. For example, if you have a client script that
needs to access the field u_retrieve, and the field is not on the form, the data is not available to
the client script. A typical solution to this situation is to place the field on the form and then
always hide it with a client script or UI policy. While this solution may be faster to configure, it is
slower to execute.
If you know what information the client needs from the server before the form is loaded, a display
business rule can create g_scratchpad properties to hold this information.
The g_scratchpad is sent to the client when the form is requested, making it available to all
client-side scripting methods. This is a very efficient means of sending information from the
server to the client. However, you can only load data this way when the form is loaded. The
business rule cannot be triggered dynamically. In those cases, use an asynchronous GlideAjax
call.
For example, assume you open an incident and need to pass this information to the client:
Consider using script includes instead of global business rules because script includes
are only loaded on request.
Using :- Script includes are found under System Definition or System UI. You can call existing
script includes from a script.
To create an entirely new script include, you can follow the format of any of the existing script
includes. In the example, the name of your Script Include is 'NewInclude' and there is a single
function called 'myFunction.' It is important that the name of the script include match the name of
the class, prototype, and type. When you create a new script include and give it a name, the
system provides you a code snippet with the class and prototype set up properly.
var NewInclude = Class.create();
NewInclude.prototype = {
initialize : function() {
},
myFunction : function() {
//Put function code here
},
type : 'NewInclude'
};
WorkFlows :-
is a virtual representation of tasks consisting of connected steps planned out in a
sequential manner.A workflow is primarily use to automate a sequenceof activities.
Users with the workflow_admin or workflow_creator roles can use the Workflow Editor to create
workflows.
Workflow activity is a workflow block that organizes the individual actions the workflow
performs as it runs .
The workflow activity contains instructions that are processed by the workflow. This can include
performing scripts, manipulating records, waiting for a set period of time, or logging an event.
Workflow conditions determine whether or not the activity is performed. Activities can be added,
removed, or rearranged. Transitions can be drawn between activities.
Activities determine the functionality of the workflow. Each activity performs a different task, such
as run a script, send notifications, or request approvals. Activities can succeed or fail, which can
result in actions performed by other activities.
Approval Activities
Condition Activities
Notification Activities
Timer Activities
Task Activities
Utility Activities
Subflow Activities
Creating WorkFlows:- To create a new workflow:
1. Navigate to Workflow > Workflow Editor.
The Welcome tab displays links to workflow documentation and other related resources.
If ServiceNow Orchestration is activated, the welcome screen contains resources for that
feature as well.
2. Select the Workflows tab in the palette, and click the + icon.
3. Complete the fields in the General, Schedule, and Documentation tabs.
4. Create the workflow by clicking Submit in any tab.
1. In the title bar, click the menu icon ( ) and select Properties.
2. Complete configuration of the additional workflow properties.
3. Build the workflow by dragging activities onto the canvas and configuring activity
properties.
Workflow validation tests the workflow for potential issues that might cause it to fail, such
as missing subflows or disconnected transitions. A workflow validation report lists the
results of each validator and provides enough information to trace problems and make
any changes that are necessary.
6. Publish the workflow by clicking the menu icon and selecting Publish.
The workflow is then activated and can be used according to the defined properties.
LDAP Integration :- Certificates and Encodings
At its core an X.509 certificate is a digital document that has been encoded and/or digitally signed
according to RFC 5280.
In fact, the term X.509 certificate usually refers to the IETFs PKIX Certificate and CRL Profile of
the X.509 v3 certificate standard, as specified in RFC 5280, commonly referred to as PKIX
for Public Key Infrastructure (X.509).
.DER = The DER extension is used for binary DER encoded certificates. These files may
also bear the CER or the CRT extension. Proper English usage would be I have a DER
encoded certificate not I have a DER certificate.
.PEM = The PEM extension is used for different types of X.509v3 files which contain ASCII
(Base64) armored data prefixed with a BEGIN line.
1). Load certificate x.509, Type DER , PEM (Like .doc, .pdf file type ) from Active Directory ( A.D )
Admin we get it. Privacy Enhanced Mail (PEM) ,
2).Create Server
3).LDAP configuration
4).O.U Definition
6).Define Transformer
7).Create Schedules
PEM Format It is the most common format that Certificate Authorities issue certificates in. It
contains the BEGIN CERTIFICATE and END CERTIFICATE statements.
Several PEM certificates and even the Private key can be included in one file, one below the other.
But most platforms(eg:- Apache) expects the certificates and Private key to be in separate files.
> They are Base64 encoded ACII files
> They have extensions such as .pem, .crt, .cer, .key
> Apache and similar servers uses PEM format certificates
DER Format It is a Binary form of ASCII PEM format certificate. All types of Certificates &
Private Keys can be encoded in DER format
> They are Binary format files
> They have extensions .cer & .der
> DER is typically used in Java platform
Q1 : Can we create Existing groups as a subgroup while creating a new group?
Ans : It can be done by adding related links , will let you the workaround later.
Q2 :Why do we create subgroups ?
Creating subgroups allows you to customize your contact list to send messages to a targeted
group of members within your system.
Q3: What are Elevated Privileges ?
An elevated privilege is a role that has the elevated_privilege field set to true. After the plugin is
activated, a new security_admin elevated privilege is created and assigned to the default System
Administrator user. This role grants modification access to the High Security Settings and allows
the user to modify the Access Control List, directly import XML files, and access the Scripts -
Background module. A user can get an elevated privilege role in his session only by manually
elevating to it. The role is in the user's session only for the duration of the session. Session
timeout or log-out removes the role.
A role that is an elevated_privilege does not appear in an assigned user's session when the
user logs in. The user must manually elevate to that role. See the following section for details.
(Requires admin or security_admin role) Presents the Activate an Elevated Privilege dialog box,
which allows the administrator to select an elevated role, which will expire at the end of the
session.
other roles available are :
High Security Settings: provide default property values to harden security on your platform by
centralizing all critical security settings to one location for management and auditing.
Default Deny Property: provides a security manager property controls the default security
behavior for table access.
Security Administrator Role: provides a role to prevent modification of key security settings
and resources. The Security Administrator role is not inherited by the admin role and must be
explicitly assigned.
Elevated Privilege: allows users with the security admin role to operate in the context of a
normal user and elevate to higher security role when needed.
Property Access Control: allows security administrators to set the roles required to read and
write properties.
Transaction and system logs: are read only.
Access Control Rules: control what data users can access and how they can access it
Q4 : Use case for Understanding groups and roles?
It is fact that you can assign roles to individual users as well, and not just to groups.
use case:
A university Physics professor has "Grade Test" role (aka right or privilege) for a particular
course or set of courses. However, he decides to go on sabbatical for year and wants another
instructor (or perhaps, several instructors - a group), i.e. his replacement(s), to have the same
role(s) (privileges) over the same set of courses. Note that the substituting instructors may
belong to different user groups. The administrator can easily assign the role(s) in question to
individual users or groups of users. Of course, after the tenured professor returns, the
administrator can revoke those roles (privileges).
From a system perspective we only care which methods a user (or a group of users) is allowed
to execute. Before executing restricted method we check user roles by calling other methods that
normally return Boolean values.
Q5: What is internal integration User ?
Select this check box to designate this user as an internal integration user.
Enabling WSS[web services security] requires authentication for all SOAP requests including
internal integration communications such as the MID Server, ODBC Driver, Remote Update Sets,
and high availability cloning. SOAP requests for these internal integration communications
cannot implement WSS due to technical implications. If your instance uses these SOAP
interfaces, you can allow them to bypass the WSS authentication requirement by marking their
user accounts as internal integration users
What will run first business rule or client script? what will run first?
Client script, Business rule, UI policy or Data policy.
Client-based code: "Client-based code that executes in the browser, using Ajax or running as
Javascript, always executes before the form submission to the server."
First onLoad Client scripts, after that the first UI Policies kick in.
After that, the Client scripts and UI Policies that work onChange.
The application server and the database are located at the data center.
1 query
var rec = new GlideRecord('incident');
rec.query();
while (rec.next()) {
gs.print(rec.number + ' exists');
}
3.2 update
var rec = new GlideRecord('incident');
rec.addQuery('active',true);
rec.query();
while (rec.next()) {
rec.active = false;
gs.print('Active incident ' + rec.number = ' closed');
rec.update();
}
3.3 insert
var rec = new GlideRecord('incident');
rec.initialize();
rec.short_description = 'Network problem';
rec.caller_id.setDisplayValue('Joe Employee');
rec.insert();
3.4 delete
var rec = new GlideRecord('incident');
rec.addQuery('active',false);
rec.query();
while (rec.next()) {
gs.print('Inactive incident ' + rec.number + ' deleted');
rec.deleteRecord();
}
Answer : Service Now Instance URL / <Table Name>.do?CSV - For CSV file
Example : https://demo005.service-now.com/incident.do?CSV
Answer : Click on 'Administrator Icon' , Enter the User Name and click on 'Ok
Q). How to find the sys_id of a specific object in service now ? For eg : I want to know the
sys_id of 'Create New' Module in 'Change' Application
Answer : Search for 'Change' Application, Edit , Right click on the Module which you want to find
the sys_id,, choose 'Copy sys_id' field, this will display you the corresponding sys_id of selected
module/application/workflow/table/etc..
Answer : Launch the form, Right click on top header section, choose Personalize( Configure ) ->
Table, This will list out the table name and all the existing columns in a table.
Answer : Search for 'Workflow Editor' -> Choose 'Open' Menu -> Search for the work flow that
you want to open, and select it -> If it is already published, then choose 'Check out' from the
'Gear' Menu -> Modify the work flow, and publish finally.
Answer : Search for 'Events' -> Select 'Events' Module under 'System Logs'
Answer : Once the catalog item order is submitted, You should see a message 'Thank you , your
request has been Submitted' , click on the 'Description Link' -> Right click on Request Item
page -> View -> Default -> You will see approver tab, if you belongs to approver group.
Example : https://dev15439.service-now.com/incident.do?wsdl
Q). How to see all the existing work flows ? and belongs to which table ? etc . ?
Answer : Search for 'Workflow Versions', You can filter by work flow name, table name etc..
Q). How to add log messages and view them in Service Now ?
Answer : Below are all the possible ways how we can log specific message
current.field_name.setError("Hello World"); Will put "Hello World" below the specified field
gs.addInfoMessage("Hello World"); Will put "Hello World" on the top of the screen
gs.print("Hello World"); Will write to the text log on the file system but not to the sys_log table in
the database
gs.log("Hello World"); Will write to the database and the log file. Too much of this can adversely
affect performance
To view - System Log -> All , It will show all the log messages
Q). How do you check the upgrades that are made to the system, using which
module? Ans. System Diagnostics-- Upgrade History
Q). Do you know anything about SaaS and PaaS. Service Now comes under what
category?
Q). My manager is going to be out of town and needs to have the supervisor approve
while he/she is out of town, what would he/she utilize in ServiceNow?
Ans: Delegate-Delegation is the ability to designate other users to receive and interact with
approvals and task assigned to you
Q). What is this MID Server and How are the MID servers administered?
It is a small Java process that runs the probes for the discovery.All administration (with the
Q). Do integrations need to be done before the ServiceNow implementation goes live?
You can establish integrations before or after the ServiceNow implementation goes live,
however the best practice is to enable integrations before your implementation goes live.
Enabling integrations prior to going live allows you to test the integration. This is especially
important for integrations to user lists or single sign-on applications since a problem in one of
these integrations can prevent users from logging on.
Modify your reference qualifier to show ALL Computers, Servers, etc. Hint: The query for this
should only reference a single table.
Open a couple of Business service and computer records and assign them to a particular
user. Modify your reference qualifier to only display Business services and computers
assigned to the user populated in the Caller field.Set up a new field on the incident form
called Sub-subcategory. Without writing any code, make this field dependent on the
Subcategory field.
2. It also includes functionality to limit the number of events triggered to ensure the
application doesnt tie up system resources and cause a degradation in performance.
3. Developers can now put controls in place to manage scripts for each application by setting
them up as fully editable, read-only, or protected, with the latter capable of hiding and
encrypting scripts.
5. Another new application called Test Management is introduced which helps manage the
software testing process and integrate with PPM. This is used to track test cases,
Executions, and results to allow users to report on the overall status.
6. The reporting list user interface now aligns with the rest of the platform. There are a
number of new chart types including a speedometer and dial, pyramid, and funnel; reports
are now grouped into categories including the most heavily used vs. unused; and where or
when aggregation can be used with reports has been improve.
7. Not only was out of box reporting improved but there were also a number of additions to
Performance Analytics including the ability to setup second level breakdowns or specify what
8. There are several things introduced specific to the CMDB including The Next Generation
BSM application which replaced the version in Eureka, the ability to create a baseline for a
particular business service, and functionality to log proposed changes against a CI
relationship.
9. Discovery now includes a dashboard that provides a high-level status of schedules and
status, enhanced caching ability and probes, and support for SNMPv3 enabled devices.
10. The authority documents, citations and controls from the Unified Compliance Framework
(UFC) can now be downloaded and imported into IT GRC application. Quarterly updates are
also proposed to the Administrators to make sure the Authority library is kept up to date. A
new certification survey and IT GRC reports are also part of the release.