{"id":196,"date":"2011-11-03T22:09:05","date_gmt":"2011-11-03T13:09:05","guid":{"rendered":"http:\/\/company.enterdb.com\/?p=196"},"modified":"2012-02-01T11:50:15","modified_gmt":"2012-02-01T02:50:15","slug":"netsuite-inventoryadjustment-sample-%e5%9c%a8%e5%ba%ab%e8%aa%bf%e6%95%b4-%e3%82%b5%e3%83%b3%e3%83%97%e3%83%ab","status":"publish","type":"post","link":"https:\/\/company.enterdb.com\/?p=196","title":{"rendered":"netsuite inventoryadjustment sample \u5728\u5eab\u8abf\u6574 \u30b5\u30f3\u30d7\u30eb"},"content":{"rendered":"<pre lang=\"javascript\">\r\nvar adj = nlapiCreateRecord('inventoryadjustment');\r\nadj.setFieldValue('customform',130);\r\nadj.setFieldValue('account',181);\r\nadj.setFieldValue('adjlocation',1);\r\nadj.setFieldValue('department',1);\r\nadj.setFieldValue('memo','\u73fe\u5834\u4fee\u6b63');\r\nadj.setFieldValue('subsidiary',1);\r\nadj.setFieldValue('trandate','2011\/11\/3');\r\nadj.setFieldValue('custbody41',57821); \/\/ \u5165\u529b\u8005 \r\nadj.insertLineItem('inventory');\r\nadj.setLineItemValue('inventory','adjustqtyby',1,1);\r\nadj.setLineItemValue('inventory','item',1,191);\r\nadj.setLineItemValue('inventory','location',1,1);\r\nvar adj_id = nlapiSubmitRecord(adj, true);\r\nconsole.log('adj_id='+adj_id);\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>var adj = nlapiCreateRecord(&#8216;inventoryadjustment&#8217;); adj.setFieldValue(&#8216;customform&#8217;,130); adj.setFieldValue(&#8216;account&#8217;,181); adj.setFieldValue(&#8216;adjlocation&#8217;,1); adj.setFieldValue(&#8216;department&#8217;,1); adj.setFieldValue(&#8216;memo&#8217;,&#8217;\u73fe\u5834\u4fee\u6b63&#8217;); adj.setFieldValue(&#8216;subsidiary&#8217;,1); adj.setFieldValue(&#8216;trandate&#8217;,&#8217;2011\/11\/3&#8242;); adj.setFieldValue(&#8216;custbody41&#8217;,57821); \/\/ \u5165\u529b\u8005 adj.insertLineItem(&#8216;inventory&#8217;); adj.setLineItemValue(&#8216;inventory&#8217;,&#8217;adjustqtyby&#8217;,1,1); adj.setLineItemValue(&#8216;inventory&#8217;,&#8217;item&#8217;,1,191); adj.setLineItemValue(&#8216;inventory&#8217;,&#8217;location&#8217;,1,1); var adj_id = nlapiSubmitRecord(adj, true); console.log(&#8216;adj_id=&#8217;+adj_id);<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-196","post","type-post","status-publish","format-standard","hentry","category-netsuite-sample"],"_links":{"self":[{"href":"https:\/\/company.enterdb.com\/index.php?rest_route=\/wp\/v2\/posts\/196","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/company.enterdb.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/company.enterdb.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/company.enterdb.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/company.enterdb.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=196"}],"version-history":[{"count":2,"href":"https:\/\/company.enterdb.com\/index.php?rest_route=\/wp\/v2\/posts\/196\/revisions"}],"predecessor-version":[{"id":222,"href":"https:\/\/company.enterdb.com\/index.php?rest_route=\/wp\/v2\/posts\/196\/revisions\/222"}],"wp:attachment":[{"href":"https:\/\/company.enterdb.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=196"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/company.enterdb.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=196"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/company.enterdb.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=196"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}