Skip to content

Commit 7bc3e7b

Browse files
authored
RetrieveMRVSNameAndValue.js
Access the name and corresponding value of MRVS
1 parent be1fd1a commit 7bc3e7b

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
//GlideRecord to the RITM table to access the name and corresponding value of MRVS
2+
var getVariables = new GlideRecord('sc_req_item');
3+
4+
//Pass the sysId of RITM record
5+
if (getVariables.get("<pass_ritm_sys_id_here>")) {
6+
7+
//<mobile_devices_set> is the internal name of MRVS
8+
var mrvsInternalName = getVariables.variables.mobile_devices_set;
9+
var rowsCount = mrvsInternalName.getRowCount();
10+
11+
if (rowsCount > 0) {
12+
for (var i = 0; i < rowsCount; i++) {
13+
var getRowVal = mrvsInternalName.getRow(i);
14+
var getCellVal = getRowVal.getCells();
15+
16+
for (var j = 0, len = getCellVal.length; j < len; j++) {
17+
var mrvsFieldName = getCellVal[j].getName();
18+
var mrvsFieldValue = getCellVal[j].getCellDisplayValue();
19+
gs.info(mrvsFieldName + ' : ' + mrvsFieldValue);
20+
}
21+
}
22+
}
23+
}

0 commit comments

Comments
 (0)