ITSM Interview Question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2023 11:00 AM
Hello experts,
yesterday I have given an interview for ITSM can anyone please give me the answer to the below question.
thank you.
1]how to call business rule in client script
2]how to disable attachemetn
3]what is content ietm and record prodcuer
4]how to restrict user from submiting form without attchement.
5]tell me 5 basic difference between workflow and flow designer?
6]how will you generate reports on incident form with duration.
8]parent table of cmdb
9]which script will execute first service side or client side?
10]suppose there are 1000 update set created so i need to moveupdate set from production
to testing instance ?which approach you will use?
11]how much time does it take for an incident ticket to get closed from resolved state?
12]user criteria used in which component of catalog item?
13]how can we get looged in user manager's name without writing script?
14]what we can use instaed of cuurent.update?
15]if user is added we want to create his hr profile automatically how can we configurae it?
16]differne between srvice catalog and record prodcuer?
17]which client script will run first on load or onchaneg?why?
- 21,980 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2023 05:50 AM
Hi @--oooo-- ,
Please find below answers to your questions
1. How to call business rule in client script
Calling a business rule via client script is not possible. The scratchpad value can only be obtained through a display business rule from client side. To invoke server-side script from the client side, you must create a script include and then utilize GlideAjax to call it.
2. How to disable attachment.
Add no_attachment attribute to the Table's 'Collection' dictionary record or use g_form.disableAttachments() in onload client script
3. what is content item and record producer.
A content item is a type of Catalog Item (Others are Record Producer and Order Guide). It is a service catalog item that provides information(company policies, List Of Holidays, Password reset process, etc) instead of goods or services. Content item is another table or module extended from the same sc_cat_item and is used to open knowledge articles, static blocks of text, or external web-based content from the service catalog.
A record producer is a specific type of catalog item that allows end users to create task-based records, such as incident records, from the service catalog. Use record producers to provide a better end-user experience instead of using the regular task-based form for creating records. The look and feel of a record producer is similar to that of a catalog item. But the record producer generates a task record such as incident, instead of a requested item.
4. How to restrict user from submitting form without attachment.
Create a business rule Before Insert with below code
(function executeRule(current, previous /*null when async*/) {
var gr= new GlideRecord("sys_attachment");
gr.addQuery("table_sys_id",current.sys_id);
gr.query();
if (!gr.hasNext()) {
gs.addErrorMessage("Attachment is required to submit this Request");
current.setAbortAction(true);
}
})(current, previous);
5. Tell me 5 basic difference between workflow and flow designer
Flow Designer is the newer flow tool offered by ServiceNow. The major advantage is it is more low code enabling end users to create and maintain a flow. Flow Designer supports Spokes to enable OOTB features to be used in flows. Flows can be broken up into sub-flows with sub-flows maintained by other teams. That is, each flow is usually much shorter than those written in workflow.
Flow Designer enables users to use natural language to automate tasks, record operations, notifications, and approvals without having to write it in code. It enables various process automation capabilities in a consolidated design environment.
On the other hand, workflow is the tried-and-true method that requires a more advanced developer but allows for more complex scenarios, including plenty of readily accessible scripting blocks.
(These examples may not provide exactly five differences, but they serve as illustrations to convey the concept.)
6. How will you generate reports on incident form with duration.
- Click on the "Reports" module or navigate to the "Reports" section.
- Create a new report by selecting the "New" or "Create Report" option.
- Choose the "Tabular" or "List" report type.
- Configure the report by selecting the desired columns to display, such as "Incident Number," "Opened," and "Closed."
- Add a calculated column by selecting the option to create a new formula or calculated field.
- In the formula editor, create a formula to calculate the duration by subtracting the "Opened" time from the "Closed" time. For example, the formula may be: ${closed} - ${opened}.
- Specify the desired formatting for the duration column, such as displaying it in hours or days.
- Apply any additional filters or sorting options to the report if necessary.
- Save the report and provide it with an appropriate name.
- Run the report to view the duration of incidents, which will be displayed in the calculated column you created
8. Parent table of cmdb.
cmdb is a parent class and it does not have a parent. cmdb_ci table is extended from cmdb
9. which script will execute first service side or client side?
Client-side code, whether implemented through Ajax or executed as JavaScript, always runs first in the browser before the form is submitted to the server.
10. suppose there are 1000 update set created so i need to move update set from production
to testing instance ?which approach you will use?
You can clone the production instance and they will be created in the testing environment
11. How much time does it take for an incident ticket to get closed from resolved state?
In the base system, Incident Management automatically closes incidents 1 day after they have been resolved if no updates are made to the incident. This helps incident closure by automating the Resolved -> Closed state transition. If the record is updated on any field, then the 1 day counter is reset to the last updated timestamp. (Please note that Major Incidents are not part of auto-close functionality out-of-the-box.)
12. User criteria used in which component of catalog item?
The user criteria restriction applies only within Service Catalog for the specific item it is applied for. However, the user criteria restriction is not applied outside the Service Catalog where the user has access to the item via the table.
To apply criteria directly to an item or category, use the Available For or Not Available For related lists in the Item or Category form.
13. How can we get logged in user manager's name without writing script?
Go to user profile and look at Manager field (I do not have a better answer at the moment)
14. what we can use instead of current.update?
When a business rule is configured as a "before insert" or "before update" rule, the system automatically performs a database update when the script executes. As a result, there is no need to include an additional current.update() statement in the script.
15. If user is added we want to create his hr profile automatically how can we configure it?
To automate the creation of an HR Profile when a user is inserted into the User table, you can write an on insert Business Rule. Ensure to include any necessary conditions, such as verifying that the employee number is populated, particularly when adding users who may not necessarily be employees.
16. Difference between service catalog and record producer?
The Service Catalog enhances self-service functionality by providing users with a user-friendly interface to request products or services and experience streamlined request fulfillment. It encompasses various components, including
- Catalog items
- Record producers
- Order guides
- Content Items
Record producers, in particular, are a subset of the Service Catalog offerings. They serve as intake forms where users can enter relevant information (referred to as variables) to generate a corresponding ticket that can be acted upon.
17. Which client script will run first on load or on change? why?
Typically, the OnLoad client script is executed when the form is loaded in the browser.
On the other hand, the OnChange client script is triggered only when a specific field is modified, causing the OnChange client script associated with that field to run. However, if the 'isLoading' parameter in the OnChange client script is set to true, it can also be triggered during the form's initial loading process.
Please mark response as helpful and correct if it answers your questions
Regards,
Manmohan

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2023 12:31 PM
Hi @--oooo--
I would recommend following answers to your interview questions.
1. You cannot call business rule through client script. You can only get the scratchpad value through display business rule. You can use Script Include to do the server side scripting and call it in client script.
2. If you are trying achieve this for catalog items then you can use OOB "Hide Attachment" checkbox and If you are trying to do it on form/table level then these step are required
- Open a record in the table.
- Right-click the form header and select Configure > Dictionary.
- In the list of dictionary entries, select the first record in the list (the record with no Column name entry).
- Add no_attachment to the Attributes field and save the record.
3. Content Item is a type of Catalog Item that provide Informations instead of services or goods like List of Holidays and Company Policies. Following references are included knowledge articles, static blocks of text, or external web-based content.
A record producer is a specific type of catalog item that allows end users to create task-based records, such as incident records, from the service catalog.
4. If you are trying achieve this for catalog items then you can use OOB "Mandatory Attachment" checkbox and if you are trying to do it on form/table then you can create Before Insert Business rule with condition !current.hasAttachment() and then Set Abort Action. Alternatively you can also create OnSubmit client script.
5. Five main difference between them would be following
- Reusable Actions: Allow use of natural language for automation and also use Data-pills.
- Integration Hub: To allow the integration automatically.
- Spokes: A spoke is a scoped application that includes Flow Designer custom actions or subflows.
- Subflows: Subflows are just like Flow but without triggers. They are executed from a flow or a script.
- Flow Variables: Flow variables are an advanced version of Workflow scratchpad variables. They can be created in the flow and can be modified anywhere through the flow
6. Create a new Report, Select the Table Incident as DataSource in the data section. Select the Type as Bar chart/List and In Configure section Group by Duration. Your report is create now Run the report.
8. CMDB is the parent or say Base table and all other extent it like cmdb_ci, Cost Center and Location table etc.
9. Client script will execute first as its on the browser side and its not making changes on ServerSide unless you submit the record or any other request.
10. Recommended is that update set shouldn't move from prod to test. Development must be done in Dev instance then it should move to TEST instance after that it should be move to Prod.
11. OOB configuration is that incident should be close after 7 days of being resolved.
12. User Criteria allow us to define which users/Groups should be able to access the Catalog Item and which shouldn't be able. They are defined in Available and Not Available related tabs.
13. Click on the DP on the top right of instance, Click on the profile and you will be able to see all your information. There you can change the view to default if you have required role and you can see the manager there in form.
14. You can use Before Update/Insert Business rule, Since the modifications are made before making changes to server side.
15. You can write an after Insert Business rule on user table. Condition : Created by AD Integration user
In script: you can create a record in HR profile table via glideRecord.
16. If you're offering end-users the ability to request a service where you need to control approvals and fulfillment, you will use a catalog item. If you're just looking to gather information or need to gather open-ended feedback/suggestions from your users, you will use a record producer
17. OnChange will be executed first, OnLoad client script runs when the form is loading but actually when the form is getting loaded there are some values that are being changed and populated for the form to be loaded. So Onchange can also used as alternative to onLoad.
Regards,
Ashir Waheed