function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
bwhorizonsbwhorizons 

Null date field using Bulk API

Hello,

 

I'm having trouble using #N/A to null out a date field using the Bulk API. I believe I was able to successfully do this using suggestions found on this forum just a week or two ago, but now the records in my batches fail with the following error:

 

<message>'#N/A' is not a valid value for the type xsd:date</message>
<statusCode>INVALID_FIELD</statusCode>
 
Everything I've read and seen says that that should work, and like I said, I believe I was successfully using it recently, but it seems like it stopped working.
 
I'm currently accessing the Bulk API via a perl script that talks to Salesforce over SOAP with WWW::Salesforce::Simple. Everything else seems to work exactly as intended, I'm just not able to null out these fields.
 
For an example, this is what the WSDL says about one of these fields:
<element name="Purchase_Date_SBI_SOE__c" nillable="true" minOccurs="0" type="xsd:date"/>
 
Can anyone help?
 
Thanks!
Mike SheehanMike Sheehan
Having a similar issue in that I cannot set Date fields to NULL with the XML Bulk API.  Has anyone found a solution to this?