使用 Postman 的 SuiteTalk 条目未设置自定义字段

问题描述 投票:0回答:1

当使用 NetSuite 中的 SuiteTalk SOAP Web 服务创建记录时,我尝试使用用户事件脚本测试某些功能。我需要将一些值传递到一些自定义字段。然而,这些字段没有设置任何内容。我尝试在 XML 中使用“scriptId”和“internalId”属性,但似乎没有任何效果。不知道我错过了什么。以下是我传入的 XML 示例:

<soapenv:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Header>
        <applicationInfo xmlns="urn:messages_2019_2.platform.webservices.netsuite.com">
            <applicationId>************************************</applicationId>
        </applicationInfo>
        <platformMsg:preferences soapenv:mustUnderstand="0" soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" xmlns:platformMsg="urn:messages_2019_2.platform.webservices.netsuite.com">
            <platformMsg:useConditionalDefaultsOnAdd>true</platformMsg:useConditionalDefaultsOnAdd>
            <platformMsg:ignoreReadOnlyFields>true</platformMsg:ignoreReadOnlyFields>
            <platformMsg:warningAsError>false</platformMsg:warningAsError>
        </platformMsg:preferences>
    </soapenv:Header>
    <soapenv:Body>
        <platformMsg:add xmlns:platformMsg="urn:messages_2019_2.platform.webservices.netsuite.com">
            <platformMsg:record xsi:type="ns1:SalesOrder" xmlns:ns1="urn:sales_2019_2.transactions.webservices.netsuite.com" xmlns:ns2="urn:core_2019_2.platform.webservices.netsuite.com" xmlns:ns3="urn:common_2019_2.platform.webservices.netsuite.com">
                <ns1:customForm xsi:type="platformCore:RecordRef" internalId="111"/>
                <ns1:entity xsi:type="platformCore:RecordRef" internalId="222"/>
                <ns1:tranDate>2024-03-01T00:00:00.000+00:00</ns1:tranDate>
                <ns1:exchangeRate>1.00</ns1:exchangeRate>
                <ns1:shippingAddress>
                    <ns3:country>_unitedStates</ns3:country>
                    <ns3:addressee>Johnny Bravo</ns3:addressee>
                    <ns3:addrPhone>800-555-1234</ns3:addrPhone>
                    <ns3:addr1>123 Fake St</ns3:addr1>
                    <ns3:addr2>SUITE 180</ns3:addr2>
                    <ns3:city>Albuquerque</ns3:city>
                    <ns3:state>NM</ns3:state>
                    <ns3:zip>87102</ns3:zip>
                </ns1:shippingAddress>
                <ns1:paymentMethod xsi:type="platformCore:RecordRef" internalId="5"/>
                <ns1:ccNumber>4242424242424242</ns1:ccNumber>
                <ns1:ccExpireDate>2025-08-01T12:00:00.000+00:00</ns1:ccExpireDate>
                <ns1:getAuth>T</ns1:getAuth>
                <ns1:subsidiary xsi:type="platformCore:RecordRef" internalId="1"/>
                <ns1:itemList>
                    <ns1:item>
                        <ns1:item xsi:type="platformCore:RecordRef" internalId="333"/>
                        <ns1:quantity>1</ns1:quantity>
                        <ns1:description>SERVICE FEE</ns1:description>
                        <ns1:rate>50.00</ns1:rate>
                        <ns1:line>1</ns1:line>
                    </ns1:item>
                </ns1:itemList>
                <ns1:customFieldList>
                    <ns2:customField xsi:type="ns2:StringCustomFieldRef" scriptId="custbody_custom_field_1" internalId="444">
                        <ns2:value>ABCDEF</ns2:value>
                    </ns2:customField>
                    <ns2:customField xsi:type="ns2:StringCustomFieldRef" scriptId="custbody_custom_field_2" internalId="555">
                        <ns2:value>123456</ns2:value>
                    </ns2:customField>
                </ns1:customFieldList>
            </platformMsg:record>
        </platformMsg:add>
    </soapenv:Body>
</soapenv:Envelope>
xml soap netsuite suitetalk
1个回答
0
投票

我发现问题的原因是字段需要在所选表单上可见。该字段不能根据定义隐藏,必须标记为显示在表单上,并且必须位于显示的选项卡上。否则,字段不会被设置,这非常烦人,特别是当您不希望看到该字段时。必须通过使用用户事件脚本来隐藏仅在 UI 中看不到的字段来解决这个问题。

© www.soinside.com 2019 - 2024. All rights reserved.