如何在Suitefrom 2.0中获取事务记录的createdfrom字段中的记录类型
in suitescript 1.0 we use
var createdfrom = nlapiGetFieldValue(createdfrom);
getRecordType(createdfrom);
这种方式我想在SS 2.0中使用
你可以在记录上做一个search.lookupFields
来获得它的type
。
function getTransactionType(recordId) {
var recTypeLookup = search.lookupFields({
type: search.Type.TRANSACTION,
id: recordId,
columns: 'type'
});
return recTypeLookup['type'][0].value;
}