Comment
01-11-2019
05:55 AM
01-11-2019
05:55 AM
I'm not sure this would affect the variables getting inserted, but if the BR is running on the RITM you don't need to use .get to get the record. Try something like this:
(function executeRule(current, previous /*null when async*/ ) {
var getAsset = new GlideRecord('alm_asset');
getAsset.addQuery('request_line', current.parent);
getAsset.query();
if (getAsset.next()) {
gs.log('Receive Count ' + getAsset.getRowCount(), 'NETWORK RECEIVING');
var mrvs current.variables.receive;
gs.log('mrvs ' + mrvs, 'NETWORK RECEIVING');
var newRow = mrvs.addRow();
newRow.setCellValue('asset', getAsset.getValue('sys_id'));
newRow.setCellValue('serial_number', 'TEST098098');
gs.log('mrvs 2 ' + mrvs, 'NETWORK RECEIVING');
}
})(current, previous);
If that still doesn't work you might need to open a hi ticket.