I added the record.load method and still return wo = undefined. I also tried using the actual record id instead of the woID variable and still returned undefined. Then tried breaking out the record.load from the Record.getValue method and got the same result. Not sure that it adds any value, but setting wo = RecObj returns wo = standard record. I have looked over the documentation multiple times and I don't see why this is not working. Here are snippets to show what I have done.
Returns wo = undefined
function printWoLabel() {
var currentRecObj = currentRecord.get();
var woId = currentRecObj.id;
var wo = record.load({ type: record.Type.WORK_ORDER, id: woId }).getValue({fieldId: 'tranId'});
dialog.alert({
title: "Future functionality",
message: "Under construction - please check back later."+ " woId = "
+ woId + ", wo = " + wo
});
}
Returns wo = undefined.
var RecObj = record.load({ type: record.Type.WORK_ORDER, id: woId });
var wo = RecObj.getValue('tranId');
Returns wo = undefined. Adding single quotes around the id has the same result.
var RecObj = record.load({ type: record.Type.WORK_ORDER, id: 115370});
var wo = RecObj.getValue('tranId');
Returns wo = standard record. Adding single quotes around the id has the same result.
var RecObj = record.load({ type: record.Type.WORK_ORDER, id: 115370});
var wo = RecObj;
Thanks, John