ディスカッション
AIを用いた自動化で請求書処理を合理化
AIを用いた考察を使用して、計画と予測を迅速化
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
We’re excited to announce that the 2025 Community Recap is now available! This special recap highlights the amazing contributions and achievements of our members over the year and celebrates the collective success of our community.
Check your personalized recap to see the impact you made in 2025 and how your efforts helped shape our community’s growth and success.
View Your 2025 Community Recap
Thank you to everyone for your passion, collaboration, and support. Here’s to building an even stronger community together in the year ahead!
Season’s greetings to you and yours! As we head into the holidays (December 24 – January 4), we want to take a moment to celebrate the incredible strength and collaboration within our community. Even during the break, you can continue to benefit from connecting with peers, searching related threads, posting your questions, and marking helpful replies as “Accepted” in the Support Community.
Please note our dedicated team will be on reduced coverage during this time, and regular responsiveness will resume on January 5. Wishing you a joyful and restful holiday season!
-The NetSuite Support Community Team
NetSuite の始め方 | N/record: record.Recordオブジェクト
前の記事NetSuiteの始め方| SuiteScript 2.xモジュールについてで、レコードの操作に使用されるSuiteScriptモジュールおよびN/recordモジュール、「NetSuiteの始め方| N/recordモジュールの概要」を学習しました。次に、N/record: record.Record Objectのメンバーの1つを詳しく見ていきます。
record.Recordオブジェクトは、NetSuiteレコードをカプセル化し、コードを使用してレコードを作成、コピー、ロード、編集、変換および保存できます。
標準モードと動的モード
SuiteScriptを使用してレコードを作成、コピー、ロードまたは変換する場合、次の2つの異なるモードで作業できます。
1. 標準モード
- フィールドおよびサブリストラインアイテムは、Record.save(options)をコールするまで、ソース、計算または検証されません。
- レコードを保存すると、全てが正しい順序で自動的に処理されます。
- 特定の順序で値を設定することを心配する必要はありません。
よりシンプルで順序に依存しないスクリプトが必要な場合に最適です。
2. 動的モード
- フィールドおよびサブリストラインアイテムは、UIと同様に、リアルタイムでソース、計算および検証されます。
- 予期しない結果を回避するには、UIと同じ順序で値を設定する必要があります。
最適なタイミング: NetSuiteフォームにデータを直接入力する動作を再現します。
デフォルトの動作
デフォルトでは、これらのメソッドは標準モードで動作します。
- record.create(オプション)
- record.copy(オプション)
- record.load(オプション)
- record.transform(オプション)
これらを動的モードにする場合は、追加の引数(isDynamic: true)を渡す必要があります。
ノート
- 複数のレコード・タイプを操作する場合は、record.Type列挙を使用します。
- レコードの内部IDを検索するには、レコードの内部IDの検索を参照してください。
- クライアント・スクリプトとサーバー・スクリプトの両方でサポートされています。
例: 動的モードでの注文書の作成
require(['N/record'], function(record) {
var salesOrder = record.create({
type: record.Type.SALES_ORDER,
isDynamic: true
});
salesOrder.setValue({
fieldId: 'entity',
value: 1904 // customer internal ID
});
salesOrder.selectNewLine({ sublistId: 'item' });
salesOrder.setCurrentSublistValue({
sublistId: 'item',
fieldId: 'item',
value: 777 // item internal ID
});
salesOrder.setCurrentSublistValue({
sublistId: 'item',
fieldId: 'quantity',
value: 2
});
salesOrder.commitLine({ sublistId: 'item' });
var soId = salesOrder.save();
});
ここに記載されているサンプルコードは、法律で許可される最大限の範囲で、いかなる種類の保証もなく「現状のまま」提供されます。Oracle + NetSuite Inc. は、サンプルコードの開発プラットフォームへの実装や、独自のWebサーバー構成の使用において、開発者の個々の成功を保証または保証しません。
Oracle + NetSuite Inc. は、サンプルコードに関連するデータまたは情報の使用、使用結果、正確性、適時性、完全性に関して、いかなる保証も行わず、すべての保証(明示的または黙示的)を否認します。特に、商品性、特定の目的への適合性、コードに関連するサービスまたはソフトウェアに関する保証を否認します。
Oracle + NetSuite Inc. は、サンプルコードに関連する行動から生じるいかなる種類の直接的、間接的または結果的な損害や費用についても責任を負いません。
Richard James Uri - SuiteCloud | WMS Tech | SuiteCommerce Advanced
----
- NetSuite Admin Corner | New to NetSuite
- Explore the NSC Webinars Category
- Join our poll and share your ideas! We want to know what you think. Don't forget to comment and make your voice heard!
- Expand your NetSuite knowledge by joining this month's Ask A Guru Live about Advanced Accounting. RSVP on this event now!
