ディスカッション
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/logモジュールの概要
前の記事NetSuiteの始め方 | SuiteScript 2.xモジュールについてで、SuiteScriptモジュールについて説明しました。次に、N/logモジュールを詳しく見てみましょう。
N/logモジュールは、スクリプトにメッセージを記録するために使用されます。これにより、開発者は、SuiteScriptコードの実行中に様々なレベル(デバッグ、監査、エラーおよび緊急)でログを記述できます。これは、スクリプトのデバッグ、監視および保守に特に役立ちます。
ログ・レベル:
- DEBUG: トラブルシューティングに関する詳細な技術情報。
- 監査: 重要なビジネス・イベントまたは通常の操作マイルストン。
- ERROR: 発生したがスクリプトを停止しない問題。
- 緊急: 迅速な対応が必要なクリティカルな問題。
ログ・メソッド:
- log.debug(オプション)
- log.audit(オプション)
- log.error(オプション)
- log.emergency(オプション)
作成したログは、次のようなNetSuiteアカウントの様々な部分に表示されます。
- 「スクリプト・デプロイメント」ページの「実行ログ」サブタブ(デプロイ済スクリプトの場合)
- SuiteScriptデバッガの「実行ログ」サブタブ(デバッグ時)
- 「カスタマイゼーション」>「スクリプト」>「スクリプト実行ログ」の「スクリプト実行ログ」ページ
N/logモジュールを使用するためのガイドライン
N/logの使用時に覚えておくべき重要な点は次のとおりです。
ロギングの制限:
- 各企業は、すべてのスクリプトで60分ごとに最大100,000回のログ・メソッド・コールを作成できます。
- スクリプトが過度にログを記録した場合、NetSuiteはログ・レベルを自動的に調整できます。
ログの保持:
- ログは30日間保持され、自動的に削除されます。
ストレージの制限:
- 「サーバー・スクリプト・ログ」検索および「実行ログ」サブタブには、データベース当たり最大500万のログを保持できます。
- ログを長く保持する必要がある場合は、カスタム・レコードを使用して独自のコピーを格納します。
- スクリプト実行ログ・ページでは、これらの500万の制限は共有されません。
システム・ノートおよびエラー:
- 実行ログには、システム・メッセージおよびエラーもリストされます。
- 詳細は、N/error moduleを参照してください。
親スクリプト・ロギング(クライアント・スクリプト):
- beforeLoadユーザー・イベントまたはSuiteletを使用してクライアント・スクリプトをデプロイすると、N/logからのログが親スクリプトのデプロイメント・ログに追加されます。
クライアント・スクリプト・ロギングの制限事項:
- クライアント・スクリプトがフォームに直接添付されている場合、N/logコール(log.debugやlog.errorなど)は表示されません。
- かわりに、console.log()を使用して、ブラウザ・コンソールにメッセージを記録します。
使用例:
/**
* @NApiVersion 2 .x
* @NScriptType ScheduledScript
*/
define(['N/log'], function(log) {
function execute(context) {
// スクリプトの実行開始時にデバッグメッセージを記録
log.debug({
title: 'Start Script',
details: 'The script has started execution.'
});
//スクリプトロジックを以下に入力
//スクリプトロジックの完了後に監査メッセージを記録する
log.audit({
title: 'Script Complete',
details: 'The script has finished running.'
});
}
return {
execute: execute
};
});
ここに記載されているサンプルコードは、法律で許可される最大限の範囲で、いかなる種類の保証もなく「現状のまま」提供されます。Oracle + NetSuite Inc. は、サンプルコードの開発プラットフォームへの実装や、独自のWebサーバー構成の使用において、開発者の個々の成功を保証または保証しません。
Oracle + NetSuite Inc. は、サンプルコードに関連するデータまたは情報の使用、使用結果、正確性、適時性、完全性に関して、いかなる保証も行わず、すべての保証(明示的または黙示的)を否認します。特に、商品性、特定の目的への適合性、コードに関連するサービスまたはソフトウェアに関する保証を否認します。
Oracle + NetSuite Inc. は、サンプルコードに関連する行動から生じるいかなる種類の直接的、間接的または結果的な損害や費用についても責任を負いません。
SuiteScriptのデプロイの詳細は、これらのNetSuiteの始め方記事を確認してください。
- NetSuite の始め方 | スクリプトレコードの作成方法
- NetSuite の始め方 | SuiteScript 2.x レコードでスクリプトタイプを設定する方法
- NetSuite の始め方 | スクリプトレコードの展開方法
- NetSuiteの始め方 | SuiteScript の種類の概要
今後の記事では、個々のSuiteScript 2.xモジュール
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!
