ディスカッション

スイート全体に組み込まれたAI機能は、データをより迅速に分析し、より優れた意思決定を促進する独自の考察を生成できるようにすることで、生産性を向上させ、リーダーに利便性をもたらします。オラクルのAI機能がどのように役立つかについては、これらのオンデマンド・ウェビナーをご覧ください。

AIを用いた自動化で請求書処理を合理化

AIを用いた考察を使用して、計画と予測を迅速化
NetSuiteの保存検索やレポートをマスターするための究極のガイドである分析センターを使用して、データの力を最大限に活用しましょう。複雑さを単純化し、組織の真の可能性を解き放ちます。今すぐ分析センターに参加して、新たな高みを目指しましょう!
NetSuite Release 2025.1リリース・ノートは、こちらからダウンロードできます。
Nominate Your Peers for NetSuite Support Community's Choice of the Quarter! Submit your nomination today.
Intelligent Payment Automation version 1.0.3 is now available in the SuiteApp Marketplace. The SuiteApp, powered by BILL, lets you automate payments, manage vendor details, and bank account information within NetSuite. Learn more

SuiteScript 2.0を用いて時間比較条件に一致するレコードを検索

適用

製品:  NetSuite 2022.1



シナリオ

特定の期間に作成されたレコードの検索を作成したい。

現在の時刻を確認し、それを目的の時間範囲と比較して、時間差を検索のフィルターとして使用するSuiteScriptを作成します。



解決策

SuiteScript 2.0での例:

 
//get current time 
var dateNow = new Date().getTime(); 
 
//Verify dateNow in desired DateTime format 
var tempDateNow = new Date(dateNow); 
var tempDateNowX = format.format({value:tempDateNow, type: format.Type.DATETIME}); 
 
//sample 15 minute time range converted into DateNow format 
var comparetime = 15 * 60 * 1000; 
 
//comparison 
var base = dateNow-comparetime; 
 
//base variable converted to 'date' 
var BT = new Date(base); 
 
//display desired DateTime format 
var BTX = format.format({value: BT, type: format.Type.DATE}) + ' ' + format.format({value: BT,type: format.Type.TIMEOFDAY}); 

BTX変数は、createddateフィールドの検索フィルタの値として使用します。結果がBTXの値(現在の時間から15分を引いたもの)のONまたはAFTERで作成されたケース・レコードを返す場所。

次に、SuiteScript 2.0検索のサンプル・スニペットと前述の比較を示します。

 
require(['N/search', 'N/format'], function (search,format){ 
 
//get current time 
var dateNow = new Date

ようこそ!

サインイン

完全な詳細を表示するには、サインインしてください。

登録

アカウントがありませんか?ここをクリックして始めましょう!

リーダーボード

コミュニティの達人

第4四半期 (Oct-Dec 2025年)

今週のリーダー

今月のリーダー

歴代リーダー