So I have been fiddling with using iMacros to fill in Inventory Adjustment Worksheets in NS. Since there is no import method, I've had to resort to recording a macro to fill in this page with data I fed it, as we often have several thousand lines to do. iMacros is a Firefox Extension that lets you script movements for pages, and lets you source data fields from a CSV file if needed.
Some prerequisites:
[LIST]
[*]Under Set Preferences for my user I have set the Maxiumum Entries in Dropdowns to 0 so as to eliminate all possible dropdowns.
[*]If you want to put spaces in anything it's typing in, you have to use <SP>.
[*]I have customized the Adjust Inventory Worksheet sublist to include the item Name filter box. Click the small grey Customize button, go to the Additional Filters tab, and check the box next to Name to add this on. This lets iMacros fill in the item it's working on to clear all others out of the list.
[*]The WAIT lines I have included are to allow NetSuite's JS to catch up to the fields being filled in. If your screen is running faster than mine is then you can probably lower those a tad.
[*]We have multilocation inventory enabled so the location box is a unique problem. I tried scripting the page to default that box to an option but it didn't take. iMacros lets you script clicking based on the X/Y axis but I can't seem to get that to work either. Right now I have a 4 second wait plugged in so I can pick the location from the dropdown. If you can figure out how to fix this then this will be entirely automatic (and please let me know!). I've tried SuiteScripting and manipulating it through the macro but neither seem to take.
[/LIST]
My CSV file has Item Name in column one, Quantity in column three, and New Value in column 5. New Value consists of quantity times unit cost. You can comment out the COL5 line if you are fine accepting the unit cost inside of NS and don't need to redefine it. You don't need to put <SP> in your CSV, just in anything you code.
You'll need Firefox and to install the iMacros extension. Sign into NS and load up an Inventory Worksheet page. Make sure you have setup the prerequisites.
My scripted iMacro code:
VERSION BUILD=6700624 RECORDER=FX TAB T=1 CMDLINE !DATASOURCE DnQty.csv 'Give iMacros your CSV file. This file is stored in documents/iMacros/Macros. Do not put disk pointers (C:Folder) on this line. SET !DATASOURCE_COLUMNS 5 'Must set the number of columns present in your CSV SET !LOOP 2 SET !DATASOURCE_LINE {{!LOOP}} 'These two lines tell it to skip the header row in your CSV and to loop past that. TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:main_form ATTR=ID:trandate CONTENT=6/30/10 'Put in your transaction date TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:main_form ATTR=ID:account_display CONTENT=5301 'Put in your Adjustment Account WAIT SECONDS=4 'TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:main_form ATTR=ID:location CONTENT=Location&lt;SP&gt;1 'I'm having a hard time scripting in the location drop down. If you can get it to work let me know! I just put in a 4 second delay so I could pick it manually. TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:invt_main_form ATTR=ID:Item_NAME CONTENT={{!COL1}} ' WAIT SECONDS=2 TAG POS=1 TYPE=DIV ATTR=ID:div__body ONDIALOG POS=1 BUTTON=OK CONTENT= TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:invt_form ATTR=ID:invt_invtnewqty1_fs CONTENT={{!COL3}} WAIT SECONDS=1 TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:invt_form ATTR=ID:invt_invtnewvalue1_fs CONTENT={{!COL5}} TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:main_form ATTR=ID:submitter 'Submits the Inventory Worksheet form WAIT SECONDS=1 TAG POS=1 TYPE=INPUT:BUTTON FORM=ID:main_form ATTR=ID:new 'Makes a new Inventory Worksheet form since this page doesn't have the Save & New functionality. WAIT SECONDS=1 Save this as a *.iim file in Documents\iMacros\Macros and it will show up in the list on your sidebar. Click Play (Loop) and it will go to town on your CSV file. Make sure to set the Max to how many lines there are in your CSV for it to finish them all.