Тёмный

ServiceNow Telugu Series - Episode 15 | GlideRecord in ServiceNow | ServiceNow Telugu Videos 

Gautham Digital Learning
Подписаться 91 тыс.
Просмотров 15 тыс.
50% 1

For ServiceNow Live Classes, Books, Sample Resumes, 375 Interview Questions, CSA Quizzes Please visit : learn.gauthami...
Our Website : www.gauthamit.com
Call us: +91- 9392105004, +91- 9391452336
**ServiceNow Admin E-Book Link: learn.gauthami...
**ServiceNow Development E-Book link: learn.gauthami...
**Top 375 ServiceNow Interview Questions E-Book : learn.gauthami...
‪@gauthamdigitallearning‬
In ServiceNow, GlideRecord is a JavaScript object used for database operations, such as querying, inserting, updating, and deleting records in tables. It provides a way to interact with records in the ServiceNow database using server-side scripting.
Here's a basic overview of how to use GlideRecord:
Instantiate a GlideRecord object: To work with a specific table in ServiceNow, you first need to create an instance of the GlideRecord object for that table. You can do this by specifying the table name when creating the object. For example:
javascript
Copy code
var gr = new GlideRecord('incident');
Query for records: You can use the addQuery() method to specify conditions for your query and then use the query() method to execute the query. For example, to query all open incidents:
javascript
Copy code
gr.addQuery('active', true); // active=true means open incidents
gr.query();
Iterate through records: After querying, you can use a while loop to iterate through the result set and perform actions on each record. For example:
javascript
Copy code
while (gr.next()) {
// Access fields of the record
var shortDescription = gr.getValue('short_description');
var assignedTo = gr.getValue('assigned_to');
// Perform operations on the record
// ...
}
Insert, update, or delete records: You can use GlideRecord to insert new records, update existing records, or delete records. Here are some examples:
Insert a new record:
javascript
Copy code
gr.initialize(); // Initialize a new record
gr.setValue('short_description', 'New Incident');
gr.setValue('description', 'This is a new incident record.');
gr.insert();
Update an existing record:
javascript
Copy code
if (gr.get('sys_id', 'incident_sys_id')) {
gr.setValue('short_description', 'Updated Incident');
gr.update();
}
Delete a record:
javascript
Copy code
if (gr.get('sys_id', 'incident_sys_id')) {
gr.deleteRecord();
}
Remember to replace 'incident' with the name of the specific table you want to work with and adapt the field names and conditions to your use case. GlideRecord is a powerful tool for working with data in ServiceNow, and it allows you to perform complex database operations in your server-side scripts.
ServiceNow Telugu Series - Episode 15 | ServiceNow Telugu Videos | GlideRecord in ServiceNow | ServiceNow Telugu Videos | Best ServiceNow Training | ServiceNow Course | ServiceNow Telugu Videos | Gautham Digital Learning | ServiceNow Learning | ServiceNow Telugu Video | Srinivas Sunkara | Learning ServiceNow Telugu Videos | Best ServiceNow Training in Hyderabad | Best ServiceNow Training in Bangalore | Best ServiceNow Training in Bangalore | Best ServiceNow Training in Chennai | ServiceNow Telugu Training | ServiceNow Training in Vizag | ServiceNow | Best ServiceNow Training in India | Best ServiceNow Telugu Training | ServiceNow GlideRecord

Опубликовано:

 

3 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 15   
Далее
Китайка стучится Домой😂😆
00:18
GlideRecord
18:55
Просмотров 7 тыс.
GlideSystem
19:39
Просмотров 5 тыс.