ディスカッション
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.create(options)モジュール
前回の記事「NetSuiteの始め方|SuiteScript 2.xモジュールの基本」ではSuiteScriptモジュールとN/recordモジュールの概要について解説しました。今回は、そのメンバーの1つであるN/record: record.create(options)モジュールに焦点を当てます。
record.create(options)関数は、SuiteScript 2.xのN/recordモジュールの一部です。この関数は新しい空のレコードオブジェクトを生成し、必要なデータを入力してシステムに保存できるようにします。
たとえば、次のような用途で使われます:
- 自社ウェブサイトで新規リードが登録された際に顧客(Customer)レコードを作成する
- トランザクションが処理された際に自動で注文書(Sales Order)を作成する
パラメータの詳細
ここでは、record.create(options)内の各パラメータの意味と、その効果的な使い方を説明します。
パラメーター | タイプ | Required | 説明 |
|---|---|---|---|
options.type | string | Required |
|
options.isDynamic | boolean | Optional |
|
options.defaultValues | Object | Optional | - カスタムレコードの場合は、"customrecord_employee_expense"のようなレコードの文字列IDを指定します。これにより、どの種類のレコードを作成するかが明確になります。 |
例: SuiteScriptを用いて顧客レコードを作成する
/**
* @NApiVersion 2 .x
* @NScriptType ScheduledScript
*/
define(['N/search', 'N/record', 'N/log'], function(search, record, log) {
function execute(context) {
var customerRecord = record.create({
type: record.Type.CUSTOMER,
isDynamic: true
});
customerRecord.setValue({
fieldId: 'companyname',
value: 'Sample Corporation'
});
var customerId = customerRecord.save();
return customerId;
}
return {
execute: execute
};
});
Line(s) | Purpose |
|---|---|
/ ... */ | ・スクリプトヘッダー:このスクリプトが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!
