I can access quantity, item & expirtaion date ...
# suitescript
m
I can access quantity, item & expirtaion date but not the bin/lot number. Anyone see why? Tried both getText and getValue.
Copy code
obj_result['binnumber'] = result.getText({
    name: 'binnumber',
    join: 'inventoryDetail'
});
obj_result['issueinventorynumber'] = result.getText({
    name: 'issueinventorynumber',
    join: 'inventoryDetail'
});
obj_result['tobinnumber'] = result.getText({
    name: 'tobinnumber',
    join: 'inventoryDetail'
});
b
what does your search look like
m
message has been deleted
Copy code
const merged_search_1 = search.load({
    id: 'customsearch_merge1_so'
})
merged_search_1.run().each(function (result) {
    const obj_result = {};
    obj_result['internalid'] = result.getValue({
        name: 'internalid'
    });
    obj_result['tranid'] = result.getValue({
        name: 'tranid'
    });
    obj_result['entity'] = result.getValue({
        name: 'entity'
    });
    obj_result['datecreated'] = result.getValue({
        name: 'datecreated'
    });
    obj_result['statusref'] = result.getValue({
        name: 'statusref'
    });
    obj_result['item'] = result.getText({
        name: 'item',
        join: 'inventoryDetail'
    });
    obj_result['inventorynumber'] = result.getText({
        name: 'inventorynumber',
        join: 'inventoryDetail'
    });
    obj_result['binnumber'] = result.getValue({
        name: 'binnumber',
        join: 'inventoryDetail'
    });
    obj_result['issueinventorynumber'] = result.getValue({
        name: 'issueinventorynumber',
        join: 'inventoryDetail'
    });
    obj_result['expirationdate'] = result.getValue({
        name: 'expirationdate',
        join: 'inventoryDetail'
    });
    obj_result['quantity'] = result.getValue({
        name: 'quantity',
        join: 'inventoryDetail'
    });

    results.push(obj_result);
    log.debug({title: "Results", details: obj_result});
    return true;
});
Just realised my issue - I've hard coded a single SO and this one doesn't actually have a bin. So will try with one - hopefully no issues!
b
log the columns of the search before you run it
it looks like you are guessing ids
m
I'm using that tool that shows ids and also the schema browser.
b
what does your tool say
tobinnumber
and
issueinventorynumber
are not columns available to the inventory detail join
m
I actually use both of these tools. I have the bin number now, I was doing something wrong. Thanks all.
Hang on, just realised I do not have this new extension! I have the other one that is similar that prints out the search code for ss1 & ss2...I'll see how this works. Thanks!
e
yea, thanks @NElliott, will check it out as well
n
@ec you may like these: NetSuite Advanced Field Help Extends the NetSuite Field Help and adds relevant information to improve your productivity. NetSuite: Search Export Export your saved searches to Suitescript. NetSuite Scripted Records See the customizations deployed to your records NetSuite: HTML Script Notes Add HTML elements and styles to your script notes. View Pretty Print JSON objects. Links to records. NetSuite: Show Field IDs Hover over NetSuite fields to show their IDs. Find fields by their ID or Label. NetSuite Record JSON Viewer This extension will stringify the current NetSuite record and display it NetSuite Keyboard Shortcuts Does what it says on the tin 🙂 NetSuite: Workbook Export Export your saved workbooks to SuiteQL. Workbook MUST have a table. NetSuite GoGet Record by ID Retrieves a record by type and ID. Alternate Saved Search/ Workbook exporter: NetSuite :: Saved Search Export to SS 2.x NetSuite :: WB/DS Query Export to SS 2.x
slack bookmark 1
e
Thanks! Have some of them. Just added a few more. I can’t get to GoGet Record by ID for some reason? Can you share an updated link?
Surprisingly, though, I didn’t see the absolute best and most critical (ok, one of the absolute…) tool in your list that I use daily: Netsuite Field Explorer from @michoel
❤️ 1
n
Just caught up with messages, I'm scratching my head too as I have that one installed, must have overlooked it somehow 😄 @ec You might like this one too I stumbled across a couple days ago: https://chrome.google.com/webstore/detail/netsuite-saved-search-fie/npehdolgmmdncpmkoploaeljhkngjbne?hl=en
👍 1