ディスカッション

NetSuiteの保存検索やレポートをマスターするための究極のガイドである分析センターを使用して、データの力を最大限に活用しましょう。複雑さを単純化し、組織の真の可能性を解き放ちます。今すぐ分析センターに参加して、新たな高みを目指しましょう!
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Update: Narrative Insights has been restored and is now available.

Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.

N/search > Map/Reduceスクリプトでsearch.runPagedを使用する

編集済:Jun 2, 2025 2:48PM SuiteCloud / カスタマイズ

適用

製品:  NetSuite 2022.1



シナリオ

Map/Reduceスクリプトでsearch.runPagedを使用することは、yieldを使用するためのリソースをすでに提供しているため、冗長になる可能性があります。ただし、search.runPagedはすべてのスクリプトタイプでサポートされているため、ユースケースに応じてMap/Reduceスクリプトで使用できるはずです。


注:Search.runPagedはSuiteAnswers IDのヘルプドキュメント(49291)によると、最大1000ページの検索結果しか処理できません。



解決策

Get Input Dataステージについては、以下の例を参照してください。

/**
 * @NApiVersion 2.x
 * @NScriptType MapReduceScript
 */
define(['N/search', 'N/record', 'N/runtime'],
    function (search, record, runtime) {
    function getInputData() {
        var functionLogTitle = 'getInputData';
        log.debug(functionLogTitle, '--- Start ---');
        var PAGE_SIZE = 1000;

        try {
            var tranSavedSearch = search.load({
                id: 71 //Internal ID of your Saved

ようこそ!

サインイン

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

登録

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

リーダーボード

コミュニティの達人

第2四半期 (4月~6月 2026)

今週のリーダー

今月のリーダー

歴代リーダー