Servicenow Technical Interview questions

Community Alums
Not applicable

Hi there,

Recently I have attended for an interview for ServiceNow developer role. These are the few questions that I haven't answered. Please help me with these...

1. How do I control access to variables on portal?
2. Difference between catalog item and record producer.
3. Diff between field and variable
4. Diff between Ui action and UI policy
5. How many ways can you create a field?
6. How many ways can you trigger a notification
7. Can I use GlideRecord API both in client and server scripts?
8. How can I disable a change type? (Suppose I want to disable standard change type)
9. Write script that logs Number of incidents that are active and category = Hardware and priority = critical. Print all the Incident numbers as well.

I wrote this:

var gaINC=new GlideRecord('incident');
gaINC.addQuery('priority','1');
gaINC.addQuery('category','hardware');
gaINC.query();
if(gaINC.next()){
gs.log('Number of incidents: '+gaINC.getRowCount());
gs.log('Incident numbers: '+gaINC.number);
}

10. When should you use GlideAjax?
11. How many ways you can attach a workflow to a catalog item?
12. Table name of schedule
13. How can you set timer activity in workflow to run only on weekdays?
14. How can you migrate schedules from dev to test?
15. Change vs Release management
16. I have a notification that goes to a group. All group members receive the notification except one. Why the only member didn't receive email notification? How do you troubleshoot this?

 

5 REPLIES 5

Sai Kumar B
Mega Sage

@Harsha 

I have answered as per my knowledge. well, There can be a few corrections as well 🙂 

1. How do I control access to variables on the portal? - Using UI Policies/Client scripts
2. Difference between catalog item and record producer. - Catalog item is task-driven and the Record producer is used to create table records 
3. Diff between field and variable - Field is related to the table and Variable is related to catalog/Record producer
4. Diff between Ui action and UI policy - UI policy is used to hide/mandate/read-only the fields or variables and UI Action is something you can use to do operations on table records
5. How many ways can you create a field? - Form designer/Form layout/From Dictionary table etc.
6. How many ways can you trigger a notification - Workflow/Flow designer/gs.eventQueue() method in server scripts
7. Can I use GlideRecord API both in client and server scripts? - You can in Server-side 
8. How can I disable a change type? (Suppose I want to disable standard change type) 

9. Write script that logs Number of incidents that are active and category = Hardware and priority = critical. Print all the Incident numbers as well.

I wrote this:

var count=0,arr=[];
var gaINC=new GlideRecord('incident');
gaINC.addQuery('priority','1');
gaINC.addQuery('category','hardware');
gaINC.query();
while(gaINC.next()){
count++;
arr.push(gaINC.getValue('number)); //Push incident number into an array
}
gs.log('Count : '+count);
gs.log('Incidents : '+arr);

10. When should you use GlideAjax? - Technically you can not use GlideRecord() in client script so, To retrieve data from the server you can use GlideAjax() in client scripts
11. How many ways you can attach a workflow to a catalog item? - As per my knowledge only one way, you go to the catalog item record and insert workflow over there however, suggest him flow designer you can score good 🙂
12. Table name of the schedule - cmn_schedule
13. How can you set timer activity in the workflow to run only on weekdays? - 

In your Timer activity:

Schedule based on: A Specific Schedule

Schedule: Choose the schedule that excludes weekdays

14. How can you migrate schedules from dev to test? - Yes, via Manual export and import of the records
15. Change vs Release management -  Not sure 🙂
16. I have a notification that goes to a group. All group members receive the notification except one. Why the only member didn't receive an email notification? How do you troubleshoot this? -Notifications may be disabled for that user, You can enable them in the user record