【问题标题】:How to detect exact record type of parent object in Netsuite?如何在 Netsuite 中检测父对象的确切记录类型?
【发布时间】:2019-05-16 20:05:07
【问题描述】:

我可以使用查找字段获取记录和父对象的详细信息。但我无法获取父对象记录类型。

示例:我正在尝试获取联系方式和父(公司)详细信息。

    search.lookupFields({
        type: 'contact',
        id: context.recordId,
        columns: ['entityid', 'customer.entityid', 'customer.companyname']
    });

它返回 Contact entityid 和 customer - entityid & companyname。 我也想要客户类型。它可以是潜在客户、潜在客户、客户或任何有效类型, 对于合作伙伴或供应商,我必须指定 partner.entityid 或 vendor.entityid。

无论如何要确定哪个母公司联系人有 像这样的 customer.recordtype

【问题讨论】:

    标签: netsuite suitescript2.0


    【解决方案1】:

    查找stage

    search.lookupFields({
        type: 'contact',
        id: context.recordId,
        columns: ['entityid', 'customer.entityid', 'customer.companyname', 'customer.stage']
    });
    

    【讨论】:

      【解决方案2】:

      您是否尝试过查找 customer.stage 字段?

      【讨论】:

        【解决方案3】:

        在 NetSuite 中,术语“客户”用于客户类型中的记录类型阶段 - 这可能有点令人困惑。

        Lead、Prospect 和 Customer 都是阶段,可以使用 customer.stage 作为 columns 参数中的值返回。执行此操作时,它将作为具有valuetext 属性的对象数组返回,因此您需要像<varName>['customer.stage'][0].value 一样引用它。 这只有在你知道 typecustomer 时才有效 - 否则舞台将是空的。

        如果您面临的问题实际上是获取记录类型 - IE:客户、供应商、合作伙伴等,那么您可以改用company.type

        【讨论】:

        • 感谢氪星的详细解释。 i) 你是怎么知道这些细节的?我在文档或记录浏览器中找不到这些详细信息。 ii) 我在 vendor.* 字段中将公司类型作为其他名称和详细信息的供应商。有什么想法吗?
        猜你喜欢
        • 2023-03-07
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-12-05
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多