Anyone know how to access bin number field on bin ...
# suitescript
i
Anyone know how to access bin number field on bin put away worksheet? Not seeing it on records browser and have tried: binnumber, tobinnumbers, tobins with no luck.
m
On the item sublist, there’s an
inventorydetail
subrecord. Load that and you will have access to the
tobinnumber
field.
i
Forgot to mention using standard bins not advanced bins. So their is no inventorydetail subrecord available
m
Looks like
itembinnumbers
i
Thanks that worked! Where did you find that?
s
On the chance you are trying to do a scripted putaway I use this, it's old and 1.0 but may help
Copy code
function bulkBinputaway(){
var binParam = nlapiGetContext().getSetting('SCRIPT', 'custscript_scripted_bin_putaway_bin');
var locationParam = nlapiGetContext().getSetting('SCRIPT', 'custscript_scripted_bin_putaway_location');
nlapiLogExecution('debug', 'UPDATE', 'binParam:'+binParam+' locationParam: '+locationParam);
var binPutAway = nlapiCreateRecord('binworksheet',{recordmode:'dynamic',location:locationParam});
var itemsCount = binPutAway.getLineItemCount('item');
for (var i = 1; i <= itemsCount; i++) {
	binPutAway.selectLineItem('item',i);
	var lineQty = binPutAway.getCurrentLineItemValue('item','quantity');
	var lineName = binPutAway.getCurrentLineItemValue('item','displayname');
	nlapiLogExecution('debug', 'UPDATE', 'Updated line ' + i + ' ' + lineName + ' Qty: ' + lineQty );
	var inventoryDetails = binPutAway.createCurrentLineItemSubrecord('item','inventorydetail');
	inventoryDetails.selectNewLineItem('inventoryassignment');
	inventoryDetails.setCurrentLineItemValue('inventoryassignment', 'binnumber', binParam );
	inventoryDetails.setCurrentLineItemValue('inventoryassignment', 'quantity', lineQty);
	inventoryDetails.commitLineItem('inventoryassignment');
	inventoryDetails.commit();
	binPutAway.commitLineItem('item');
}
var id = nlapiSubmitRecord(binPutAway);
nlapiLogExecution('debug', 'CREATED', 'successfully created binputaway worksheet id: '+id);
}