ディスカッション
NetSuiteの保存検索やレポートをマスターするための究極のガイドである分析センターを使用して、データの力を最大限に活用しましょう。複雑さを単純化し、組織の真の可能性を解き放ちます。今すぐ分析センターに参加して、新たな高みを目指しましょう!
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Update: Narrative Insights has been restored and is now available.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
エラー解決:「数量を変更した後でも、在庫詳細レコードを再構成する必要があります。」
適用
製品: NetSuite 2023.2
シナリオ
ユーザーは、設定>会社>機能を有効化>アイテムと在庫タブ>在庫セクションに移動し、管理者のロールを使用して在庫状況機能を有効にします。次に、ユーザーはSuiteScriptを使用して在庫調整を作成しようとしますが、数量を変更した後も在庫詳細レコードを再構成する必要がありますというエラーメッセージが表示され続けます。
解決策
エラーを解決するには、在庫がコミットされる前に在庫割当を削除する必要があります。下記のコードスニペットは、このプロセスの正しいシーケンスを示しています。
SuiteScript 1.0
SuiteScript 1.0
var obj = nlapiCreateRecord('inventoryadjustment', {recordmode:'dynamic'}); obj.setFieldValue('subsidiary', 1); obj.setFieldValue('account', 4); obj.selectNewLineItem('inventory'); obj.setCurrentLineItemValue('inventory', 'item', 897); obj.setCurrentLineItemValue('inventory', 'location', 2); obj.setCurrentLineItemValue('inventory', 'adjustqtyby', 10); var subrecord = obj.createCurrentLineItemSubrecord('inventory', 'inventorydetail'); subrecord.selectNewLineItem('inventoryassignment'); subrecord.setCurrentLineItemValue('inventoryassignment', 'quantity', 10); subrecord.setCurrentLineItemValue('inventoryassignment', 'inventorystatus', 1); subrecord.commitLineItem('inventoryassignment'); subrecord.commit(); subrecord.removeLineItem('inventoryassignment',1); obj.commitLineItem('inventory');
SuiteScript 2.0
var obj = record.create({ type: record.Type.INVENTORY_ADJUSTMENT, isDynamic: true }); obj.setValue({fieldId: 'subsidiary', value: 1}); obj.setValue({fieldId: 'account', value: 4}); obj.selectNewLine({sublistId:'inventory'}); obj.setCurrentSublistValue({sublistId: 'inventory', fieldId: 'item', value: 897}); obj.setCurrentSublistValue({sublistId: 'inventory', fieldId: 'location', value: 2}); obj.setCurrentSublistValue
タグ付けされた:
0