Forum Discussion
James, I just tested this. The error is happening on the NetSuite side. I verified that by sending a request via Postman. Here’s the SOAP request (the body of it):
<SOAP-ENV:Body>
<ns0:update>
<ns0:record ns2:type="ns1:Job" internalId="481756">
<ns1:customFieldList>
<ns4:customField ns4:scriptId="custentity777" ns4:internalId="489" ns2:type="ns4:StringCustomFieldRef">
<ns4:value/>
</ns4:customField>
<ns4:customField ns4:scriptId="custentity15" ns4:internalId="119" ns2:type="ns4:DateCustomFieldRef">
<ns4:value/>
</ns4:customField>
</ns1:customFieldList>
</ns0:record>
</ns0:update>
</SOAP-ENV:Body>
and the response:
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:xsd=“XML Schema” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”>
soapenv:Body
soapenv:Fault
soapenv:Server.userException
java.text.ParseException: Invalid dateTime format:
<ns1:hostname xmlns:ns1=“WebServices - Axis”>partners002.prod.svale.netledger.com</ns1:hostname>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
The other custom field is a string. Setting that to null works fine.
Your body statement is invalid as per the SOAP API’s specs. There is a separate region of null fields you have to declare. Your statement should be:
<SOAP-ENV:Body>
<ns0:update>
<ns0:record ns2:type="ns1:Job" internalId="481756">
<ns1:customFieldList>
<ns4:customField ns4:scriptId="custentity777" ns4:internalId="489" ns2:type="ns4:StringCustomFieldRef">
<ns4:value/>
</ns4:customField>
</ns1:customFieldList>
<ns3:nullFieldList ns2:type="ns3:NullField">
<ns3:name>custentity15</ns3:name>
</ns3:nullFieldList>
</ns0:record>
</ns0:update>
</SOAP-ENV:Body>
EDIT: actually, even this is wrong - both of your values should be in the nullFieldList:
<SOAP-ENV:Body>
<ns0:update>
<ns0:record ns2:type="ns1:Job" internalId="481756">
<ns3:nullFieldList ns2:type="ns3:NullField">
<ns3:name>custentity15</ns3:name>
<ns3:name>custentity777</ns3:name>
</ns3:nullFieldList>
</ns0:record>
</ns0:update>
</SOAP-ENV:Body>
- jamesv7 years agoNew Contributor II
FYI you can view the WSDL that defines nullFieldList here:
https://webservices.na1.netsuite.com/xsd/platform/v2016_1_0/core.xsd
The main WSDL is here:
https://webservices.na1.netsuite.com/wsdl/v2016_1_0/netsuite.wsdl