ディスカッション
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
SuiteScriptでシリアル番号アイテムの移動伝票を一部配送する
適用
製品: NetSuite 2023.1
シナリオ
NetSuiteには、いくつかの方法で転送オーダー・レコードを作成することができます。この記事は、SuiteScript 2.0機能を使用してこれを実現する方法を紹介いたします。SuiteScript開発が初めての場合、記事のサンプルは、スクリプトからNetSuiteにレコードを作成する方法を理解するのに役立ちます。
解決策
次のソリューション・サンプルは、Suiteletサーバー側スクリプトを使用して移動伝票レコードを作成する方法を示しています。このスクリプトは、UIの動作を模倣するために、動的モードを使用してレコードを作成します。
SuiteScript 2.0を使用したサンプル・スクリプト。このサンプルでは、レコード・モジュールを使用します。このモジュールの詳細は、N/record Moduleを参照してください。
- 「カスタマイゼーション」>「スクリプト」>「スクリプト」>「新規」の順に移動します
- 次のサンプル・コードを使用して、前のステップで作成したフォルダにスクリプト・ファイルをアップロードします
- 「スクリプト・レコードの作成」をクリックします。
- 基本情報:
- 名前: スクリプト名の入力
- ID: スクリプトIDを入力します
- 「保存してデプロイ」をクリックします。
- 基本情報:
- 名前: Suitelet oAuthと入力します。
- ID: デプロイメントIDの入力
- ステータス: リリース済の選択
- ログ・レベル: デバッグの選択
- ロールとして実行: 管理者の選択
- 「保存」をクリックします。
/**
* @NApiVersion 2.0
* @NScriptType Suitelet
* @NModuleScope SameAccount
*/
define(['N/record'], /**
* @param {record} record
*/ function (record) {
/**
* Definition of the Suitelet script trigger point.
*
* @param {Object} context
* @param {ServerRequest} context.request - Encapsulation of the incoming request
* @param {ServerResponse} context.response - Encapsulation of the Suitelet response
* @Since 2015.2
*/
function createTransferOrder(context) {
try {
log.debug({ title: 'context', details: context });
if (context.request.method === 'GET') {
var transferOrder = record.create({
type: record.Type.TRANSFER_ORDER,
isDynamic: true
});
transferOrder.setValue({
fieldId: 'subsidiary',
value: 10
});
transferOrder.setValue({
fieldId: 'memo',
value: 'Created With Suitelet'