2017-06-25 73 views
2

我對SuiteScript非常新穎,所以我可能會在這裏發佈很多問題,並希望大家都能提供幫助。Suitescript 2.0 MapReduce腳本

我的第一個問題是爲什麼我的保存搜索沒有在我的MapReduce腳本上傳遞值?我的代碼如下。

function getInputData() { 
     try{ 
      log.debug("Get Input", "Initiated"); 
      //Customer Search 
      var customerSearch = search.load({ 
       id: 'customsearch_brad_itemprice' 
      }); 

      log.debug("customerSearch", customerSearch); 
      log.debug("GetInputData", "Completed"); 

      return [customerSearch]; 
     }catch(exception){ 
      log.debug("GetInputDate Error Message:",exception); 
     } 
    } 

下面是顯示變量爲空的調試日誌的映像。

Suitescript 2.0調試日誌:

enter image description here

你的見解非常感謝!

布拉德

+1

歡迎SuiteScript社會!這裏有一些資源讓你開始:1)免費NetSuite專業人士Slack社區:http://netsuiteprofessionals.com/ 2)堆棧溢出文檔部分:https://stackoverflow.com/documentation/netsuite/topics 3)免費電子郵件課程與更多的資源:http://learnsuitescript.com/ – erictgrubaugh

回答

3

您正在返回搜索數組。您需要

更改這個返回搜索對象:

return [customerSearch]; 

這樣:

return customerSearch; 
+1

這就是它Adolfo!非常感謝您的快速幫助! –

相關問題