【问题标题】:Netsuite : Advanced PDF / HTML Template - Declaring VariablesNetsuite:高级 PDF / HTML 模板 - 声明变量
【发布时间】:2018-10-20 10:30:27
【问题描述】:

谁能指导我如何声明变量? 我想将字段值(非空)存储在 1 个变量中,然后显示它。

${record.createdfrom.entity.shipaddressee} ${record.createdfrom.entity.shipcountry} ${record.shipcity}

以上是我一直在使用的字段。 我真的不知道该怎么做。

【问题讨论】:

  • 这两个答案对您有帮助吗?

标签: netsuite


【解决方案1】:

以下是我的一个 PDF 中的几个示例。

<#assign showPrices=record.custbody_hs_show_line_item_prices>
<#assign discounts=[]>
<#assign discountsCount=0>
<#assign discountStr="">
<#assign lineValues={}>
<#assign discounts=discounts+[{"item":item.item,"amount":item.amount}]>
<#assign lineValues=lineValues+{"item":item.item,"description":item.description,"quantity":0,"rate":0,"amount":0,"taxrate":item.taxrate1,"billCycle":item.billingcycle}>

这应该让您了解不同类型的赋值语句。

【讨论】:

    【解决方案2】:

    https://freemarker.apache.org/docs/index.html

    您必须记住,NetSuite 目前仅使用 FreeMarker 版本 2.3.26-incubating。文档中的某些选项可能不可用。

    【讨论】:

      【解决方案3】:

      你可以使用 例如 这会将“0”分配给变量计数

      【讨论】:

        猜你喜欢
        • 2019-07-18
        • 2017-02-19
        • 2014-05-08
        • 2017-05-31
        • 2023-01-31
        • 2018-01-10
        • 2022-12-04
        • 2018-01-01
        • 2019-04-29
        相关资源
        最近更新 更多