zoukankan      html  css  js  c++  java
  • nlapiGetContext 应用与介绍

    var currentContext = nlapiGetContext();

    var procId = currentContext.getSetting('SCRIPT',ncConst.BGP_ProcessIdParam);

    去读取这个值,难道这个值可以动态被设置?

    错了, 这个值不可以动态设置!这个Type:SCRIPT是UI级的手工在script地方设置,

    下面介绍取值的

    getSetting(type, name)
    Returns a system or script setting
    Important: SCRIPT is the only type supported in Client SuiteScript.

    Parameters
    ? type{string}[required] - The type of script/system setting. Possible values include:
    ? SCRIPT - script parameter (defined per script)
    ? SESSION - session variable (volatile setting defined per session)
    ? FEATURE - returns T (enabled) or F (disabled) depending on whether a feature is
    enabled. In the SuiteScript Reference Guide, see "Feature Names and IDs" o
    page 335 for all NetSuite feature names and internal IDs.
    ? PERMISSION - returns permission level: 0 (none), 1 (view), 2 (create), 3 (edit), 4
    (full). In the SuiteScript Reference Guide, see "Permission Names and IDs" o
    page 327 for all NetSuite permission IDs.
    ? name {string} [required]- The name of the script/system setting


    Important: You must use the nlobContext.getSetting method on nlapiGetContext to reference
    script parameters. For example, to obtain the value of a script parameter called
    custscript_case_field, you use the following code:
    nlapiGetContext().getSetting('SCRIPT', 'custscript_case_field')


    Returns
    ? If type is specified as SCRIPT, SESSION, or FEATURE, a string value is returned. If
    type is specified as PERMISSION, an integer value is returned.

    -------------------------------------------------------------------------------------------------

    下面介绍设置值的:

    setSetting(type, name, value)
    Sets the value of a script or user-defined setting. Only available in Server SuiteScript.
    ? type{string} [required] - The type of script/system setting
    ? SESSION - session variable (volatile setting defined per session)
    ? name{string} [required]- The name of the script/system setting
    ? value {string} [required]- The new value for the script/system setting
    Returns
    ? void

    所以我们可以知道设置时,仅支持设置SESSION类的东西,其他类不支持。

  • 相关阅读:
    Intellij Idea免费激活方法
    算法中的 log 到底是什么?
    java 历史版本下载
    IntelliJ远程调试教程
    【转载】 tensorflow batch_normalization的正确使用姿势
    【转载】 Tensorflow如何直接使用预训练模型(vgg16为例)
    某宝购入牙膏厂U后其售后事宜的思虑
    【转载】 tensorflow: 怎样找到对应的bazel 版本和安装
    【转载】 优必选悉尼 AI 研究院何诗怡:基于课程学习的强化多标签图像分类算法 | 分享总结
    【转载】 科研工作者的哪些「新手常见错误」
  • 原文地址:https://www.cnblogs.com/backuper/p/1369527.html
Copyright © 2011-2022 走看看