Skip to content

Commit 9825f35

Browse files
authored
Usage of getlink and choosewindow methods in gliderecord. (#1077)
1 parent 34266af commit 9825f35

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
chooseWindow method is used to paginate the records while using Glide Record on any table.
2+
This method allows you to paginate through records, fetching only a window (subset) of records, which can be useful for performance when dealing with large datasets.
3+
summary : Paginate large result sets by selecting a window of records.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
var gr = new GlideRecord('incident');
2+
gr.chooseWindow(0, 10); // Fetch the first 10 records
3+
gr.query();
4+
while (gr.next()) {
5+
gs.info(gr.number);
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
getLink() generates a direct URL to the record, useful for embedding links to records in notifications or logging them.
2+
Summary: Generate a URL link to the record.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
var gr = new GlideRecord('incident');
2+
if (gr.get('sys_id_of_record')) {
3+
gs.info('Incident link: ' + gr.getLink());
4+
}

0 commit comments

Comments
 (0)