【问题标题】:How to add netsuite Primary Subsidiary on customer upsert如何在客户 upsert 上添加 netsuite 主要子公司
【发布时间】:2021-09-21 12:30:18
【问题描述】:

我正在使用以下 SOAP 请求将客户更新插入 NetSuite。

它正在重新调整以下内容:ERROR USER_ERROR Please enter value(s) for: Primary Subsidiary

我尝试添加子字段和其他一些字段,但似乎没有任何效果。

有人知道如何在客户 upsert 上分配主要子公司吗?

谢谢!

<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" 
    xmlns:ns1="urn:messages_2019_1.platform.webservices.netsuite.com" 
    xmlns:ns2="urn:relationships_2019_1.lists.webservices.netsuite.com" 
    xmlns:ns4="urn:relationships.lists.webservices.netsuite.com" 
    xmlns:ns3="urn:core_2019_1.platform.webservices.netsuite.com"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soap-env:Header>
        <tokenPassport>
            <account>%v</account>
            <consumerKey>%v</consumerKey>
            <token>%v</token>
            <nonce>%v</nonce>
            <timestamp>%v</timestamp>
            <signature algorithm="HMAC-SHA256">%v</signature>
        </tokenPassport>
        <preferences>
      </preferences>
    </soap-env:Header>
    <soap-env:Body>
        <ns1:upsert>
            <ns2:record xsi:type="ns2:Customer" externalId="10">
                <ns2:entityId>%v</ns2:entityId>
                <ns2:companyName>%v</ns2:companyName>
                <ns2:email>%v</ns2:email>
                <ns3:customField xsi:type="ns3:RecordRef" scriptId="custbody_inv_worksheet_currency">
                    <ns3:value internalId="10">
                        <ns3:name>EUR</ns3:name>
                    </ns3:value>
                </ns3:customField>
                <ns2:customFieldList>
                    <ns3:customField xsi:type="ns3:SelectCustomFieldRef" scriptId="custentity_vies_check_customer">
                        <ns3:value internalId="2">
                            <ns3:name>Approved</ns3:name>
                        </ns3:value>
                    </ns3:customField>
                    <ns3:customField xsi:type="ns3:SelectCustomFieldRef" scriptId="custentity_sales_type">
                        <ns3:value internalId="2">
                            <ns3:name>B2B</ns3:name>
                        </ns3:value>
                    </ns3:customField>
                    <ns3:customField xsi:type="ns3:SelectCustomFieldRef" scriptId="custentity_kyc_status">
                        <ns3:value internalId="2">
                            <ns3:name>Approved</ns3:name>
                        </ns3:value>
                    </ns3:customField>
                    <ns3:customField xsi:type="ns3:SelectCustomFieldRef" scriptId="custbody_inv_worksheet_currency">
                        <ns3:value internalId="10">
                            <ns3:name>EUR</ns3:name>
                        </ns3:value>
                    </ns3:customField>
                </ns2:customFieldList>
            </ns2:record>
        </ns1:upsert>
    </soap-env:Body>
</soap-env:Envelope>

【问题讨论】:

    标签: soap netsuite suitetalk


    【解决方案1】:

    如果您查看 NetSuite 模式浏览​​器 (https://www.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2021_2/schema/record/customer.html),您会看到子字段名为“subsidiary”并且是 RecordRef 类型,因此在您的代码中您需要(假设 C#)使用"new RecordRef { internalid = XX } 为子公司创建 RecordRef 并将其分配给客户对象中的字段。

    【讨论】:

      猜你喜欢
      • 2022-08-19
      • 1970-01-01
      • 2021-04-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-03
      • 2020-12-03
      • 2021-05-07
      相关资源
      最近更新 更多