Hi Everyone,
Since I am attending the "school of hard knocks" as far as SuiteScript is concerned, I probably have more issues with my code than the question I am currently asking, but can anyone tell what I am doing that prevents me from even creating a script record? I have seen a couple of similar posts, but they have not helped in determining the issue. And a number of the examples in SuiteAnswers relate to SuiteScript 1.0, which aren't helping me figure out 2.0. Any help is greatly appreciated.
Thanks, John
/**
*@NApiVersion 2.x
*@NScriptType Portlet
*/
define(['N/search'], function(search) {
function render(params) {
var portlet = params.portlet;
portlet.title = "MicroFab Select Inventory List";
portlet.addColumn({
id: 'Part Number',
type: 'text',
label: 'Part Number',
align: 'LEFT'
});
portlet.addColumn({
id: 'Description',
type: 'text',
label: 'Description',
align: 'LEFT'
});
portlet.addColumn({
id: 'Location',
type: 'text',
label: 'Location',
align: 'LEFT'
});
portlet.addColumn({
id: 'Bin Number',
type: 'text',
label: 'Bin Number',
align: 'LEFT'
});
portlet.addColumn({
id: 'On Hand',
type: 'float',
label: 'On Hand',
align: 'LEFT'
});
var itemSearch = search.load({
id: 'Customsearch930'
});
itemSearch.run({
});
for(var i=0;i<searchResult.length;i++){
var listItem = (searchResult[i].getText({name:'Name'}));
var listDesc = (searchResult[i].getText({name:'Description'}));
var listLoc = (searchResult[i].getText({name:'Bin On Hand : Location'}));
var listBin = (searchResult[i].getText({name:'Bin On Hand : Bin Number'}));
var listQoh = (searchResult[i].getValue({name:'Bin On Hand : On Hand'}));
list.addRows({
rows : [{Name : 'value1', Description : 'value2', Location : 'value3', Bin : 'value4', Qoh : 'value5'},
{columnid1 : 'value1', columnid2 : 'value2', columnid3 : 'value3', columnid4 : 'value4', columnid5 : 'value5'}]
});
return {
render: render
};
}}});