function service(request, response){
// Request a hardcoded inventory item
var item = new Array();
item[0] = new Object();
item[0].internalid = '47';
item[0].itemtype = 'InvtPart';
// Return item values for the requested inventory item
var shoppingSession = nlapiGetWebContainer().getShoppingSession();
var itemfieldValues = shoppingSession.getItemFieldValues(item);
var itemJSON = JSON.stringify(itemfieldValues);
nlapiLogExecution('DEBUG', 'itemfieldValues', itemJSON);
response.setContentType('JSON');
response.writeLine(itemJSON);
}
No comments:
Post a Comment