NetSuite : SDF 基础指南

发布时间 2023-04-04 00:11:47作者: 橙噫i

VS Code 使用 SDF

image

  1. SuiteCloud : Create Project
  2. SuiteCloud : Set Up Account (连接沙盒环境)
  3. SuiteCloud : Import Objects
    Objects 目录下会新增脚本 xml 文件,整体文件结构如下

    建议:把脚本 xml 文件中 status 标签中的值修改为 TESTING(MR 脚本修改为 NOTSCHEDULED),待部署后在生产环境中验证再发布脚本,以防对生产环境的数据产生影响

    ├── .gitignore
    ├── project.json
    ├── src
    │   ├── AccountConfiguration
    │   ├── FileCabinet
    │   │   ├── SuiteScripts
    │   │   ├── Templates
    │   │   │   ├── E-mail Templates
    │   │   │   └── Marketing Templates
    │   │   └── Web Site Hosting Files
    │   │       ├── Live Hosting Files
    │   │       └── Staging Hosting Files
    │   ├── Objects
    │   │   └── customscript_ip_service_register_cs.xml
    │   ├── Translations
    │   ├── deploy.xml
    │   └── manifest.xml
    └── suitecloud.config.js
    
  4. SuiteCloud : Add Dependency References to the Manifest
  5. SuiteCloud : Set Up Account (连接生产环境)
  6. SuiteCloud : Validate Project
    验证通过,终端输出如下
    2022-10-21 13:20:40 - BBC Sandbox To Production
    Validating against 8116039 - Biocytogen Boston Corp. - Administrator.
    Validate manifest -- Success
    Validate deploy file -- Success
    Validate configuration -- Success
    Validate objects -- Success
    Validate files -- Success
    Validate folders -- Success
    Validate translation imports -- Success
    Validation of referenceability from custom objects to translations collection strings in progress. -- Success
    Validate preferences -- Success
    Validate flags -- Success
    Validate for circular dependencies -- Success
    Validate account settings -- Success
    Validate Custom Objects against the Account -- Success
    Validate file cabinet items against the account -- Success
    Validate translation imports against the account -- Success
    Validation of references to translation collection strings against account in progress. -- Success
    Validation COMPLETE
    The validation process has finished.
    
  7. SuiteCloud: Upload File

    此命令只能一次上传一个文件到文件柜
    建议手动使用zip压缩文件一次性上传

  8. SuiteCloud : Deploy Project

CLI 使用 SDF

  1. suitecloud project:create -i
  2. suitecloud account:setup -i
  3. suitecloud objects:import -i
    ? Do you want to import all object types: Yes
    ? Do you want to enter a script ID to filter your list? Yes
    ? Enter the full or partial script ID. [your script's ID ('customscript...')]
    ? Select the objects you want to import [find your script in the list]
    ? Do you want to import the SuiteScript files referenced in the objects? 
    [Select "No" if you already have those SuiteScript files on your computer. 
    If you want to import those files and overwrite anything that you might already have, select "Yes."]
    ? Select the folder where you want to import the objects. /Objects
    ? All the selected objects in the project will be overwritten with the objects from the account. 
    Do you want to continue? Yes
    
  4. suitecloud project:adddependencies
  5. suitecloud account:setup -i
  6. suitecloud project:validate
  7. suitecloud file:upload -i
  8. suitecloud project:deploy
    成功部署项目输出如下
    The deployment process has finished successfully.
    Deploying to 123456 - Test, Inc. - 管理员.
    2023-04-03 00:38:51 (PST) ?????
    ?? -- Account [(PRODUCTION) Test, Inc.]
    ?? -- Account Customization Project [Test_SDF]
    ?? -- Framework Version [1.0]
    ???? -- ??
    ?????? -- ??
    ???? -- ??
    ???? -- ??
    ???? -- ??
    ????? -- ??
    Validate translation imports -- ??
    ?????????????????????? -- ??
    Validate preferences -- ??
    Validate flags -- ??
    Validate for circular dependencies -- ??
    *** ?? ***
    
    ?????
    
    ????????????
    ????: ????????? /SuiteScripts/,
    /Templates/E-mail Templates/,
    /Templates/Marketing Templates/,
    /Web Site Hosting Files/ ????
    ??: ~/FileCabinet/.DS_Store
    
    2023-04-03 00:38:52 (PST) ???? (0 minutes 1 second)