有谁知道在哪里可以找到SS2.0 JSDOC定义库?

fel*_*ang 2 netsuite suitescript

有谁知道或有一个我可以用于SS2.0的JSDOC定义库?

我对SS1.0的当前版本如下所示,我用它来插入我的IDE并获得自动完成功能.

/** * Loads an existing saved search. The saved search could have been created using the UI, or created using nlapiCreateSearch(type, filters, columns) in conjunction with nlobjSearch.saveSearch(title, scriptId). 
*<br>API Governance: 5 
* @param {String} recType [optional] - The record internal ID of the record type you are searching (for example, customer|lead|prospect|partner|vendor|contact). This parameter is case-insensitive. 
* @param {String} searchId - The internal ID or script ID of the saved search. The script ID of the saved search is required, regardless of whether you specify the search type. If you do not specify the search type, you must set type to null and then set the script/search ID. 
* @returns {nlobjSearch} nlobjSearch
* @since 2012.1 */ 
function nlapiLoadSearch(recType, searchId) { };
Run Code Online (Sandbox Code Playgroud)

这不是一个技术问题,但对每个人都会派上用场.

Lei*_*ard 7

你可以考虑我做了什么,没有必要下载其他插件.
如果您拥有SS2.0 API的副本,然后使用"@param"和"@type"JSDOC标记,您将能够启用代码帮助.
然后,每次键入"CTRL"+"SPACE"时都会有建议.
除此之外,你的IDE还会提供每个函数的描述.
这就是你要做的.

样品

  1. 在NetSuite帐户上,下载SuiteScript 2.0 JavaScript文件.您可以通过> Documents> Files> SuiteScripts>来实现此目的.然后在屏幕的右侧,您应该会看到"SuiteScript 2.0 API"和"SuiteSCript 1.0 API"的链接.单击以下载SS2.0.
    在此输入图像描述
  2. 在Eclipse IDE上,为SS2.0创建一个新的JavaScript项目或将其包含在现有项目中.
  3. 在您正在使用的项目上,右键单击,然后选择"属性".在> JavaScript> Include Path下,然后在"Projects"子选项卡下,添加包含SS2.0 API的项目.
  4. 您现在将拥有SS2.0的对象文字API的代码辅助.这些是'N/log'和'N'util'模块.
  5. 接下来为SS2.0的对象构造函数API启用代码辅助,如'N/record'和'N/search'模块,我们应该在每个函数声明上添加"@param"JSDoc标记.

    所以,如果我们要使用"N /记录","N /搜索",并在我们的脚本"N /错误"模块,我们应该有低于之前的函数声明样品的意见.但请注意,它应该匹配"{[VALUE HERE]}"标记内的值和模块名称.还有注释部分和函数声明中的变量名称.

    /**
    * Do something.
    * 
    * @param {record} objRec
    * @param {search} objSearch
    * @param {error} objError
    * 
    */
    function doSomething(objRec, objSearch, objError)
    {
           //CODE HERE
    }
    
    Run Code Online (Sandbox Code Playgroud)


    您也可以使用'@type'作为变量声明.下面是示例代码.

    /**
    * Do something.
    * 
    */
    function doSomething()
    {
           /*** @type record**/
           var recCustomerRefund = record.create(
                {
                    type : 'customerrefund',
                    isDynamic : true
                }); 
    }
    
    Run Code Online (Sandbox Code Playgroud)

    在此输入图像描述