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
D0ubleStakkedD0ubleStakked 

can't send "null" to a Date field?

Hi,
  I am building integration with SFDC using their APEX API in .NET.
  I am using the enterprise.wsdl, and I have generated my proxy classes w/o any issues and everything has been working great with one exception.
 
  One of the objects that I am sending data to has a custom date field.  If that date field has a value, and then that value is nulled out, I can't seem to figure out how to send "null" back to SFDC so that it nulls out the date field.
 
  I've tried:   
         object.DateField__c = Nothing;
D0ubleStakkedD0ubleStakked

apologies - a key sequence must have submitted this twice for me before I was done typing.

I'll start over:

I am building integration with SFDC using their APEX API in .NET.

  I am using the enterprise.wsdl, and I have generated my proxy classes w/o any issues and everything has been working great with one exception.
 
  One of the objects that I am sending data to has a custom date field.  If that date field has a value, and then that value is nulled out, I can't seem to figure out how to send "null" back to SFDC so that it nulls out the date field.
 
  I've tried:   
         object.DateField__c = Nothing;
      and
         object.DateFied__c = #12:00 AM#
 
  and both produce errors from SFDC.
 
  Any ideas on how to send a "null" date value to SFDC through their APEX API?
 
Thanks,
-Brian
D0ubleStakkedD0ubleStakked
SOLVED
Looks like someone else posted the exact same question recently