Title
#suitescript
al3xicon

al3xicon

02/20/2017, 9:18 PM
function KW_getCustomList(listId) {
	var custlist = nlapiLoadRecord('customlist', listId);
	var custlistLength = custlist.getLineItemCount('customvalue');
	var custListObj = {};
	for ( var j = 1; j <= custlistLength; j++) {
		var value = custlist.getLineItemValue('customvalue', 'value', j);
		var valueid = custlist.getLineItemValue('customvalue', 'valueid', j);
		custListObj[value] = valueid;
	}
	return custListObj;
}