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
ldChrisldChris 

Date Not updating

Here is my code:

Dim cases(1) As sforce.sObject
Dim caseObj As sforce.Case
caseObj = New sforce.Case
caseObj.Id = Request.Form("caseId")
'--------------------------------
caseObj.acStatus__c = Request.Form("acStatus")
caseObj.acReason__c = Request.Form("acReason")
caseObj.acDate__c = "2005-01-01"
'--------------------------------
cases(0) = caseObj
Dim sr() As sforce.SaveResult = binding.update(cases)

It updates acStatus__c and acReason__c, but acDate__c stays null.

acDate__c is set as 'Date' in salesforce.

this is in vb asp.net

Thanks!

Chris

Message Edited by ldChris on 12-01-2005 01:44 PM

Message Edited by ldChris on 12-01-2005 01:45 PM

SuperfellSuperfell
add
acDate__cSpecified = true
ldChrisldChris
That did it!
Thanks Simon.

--Chris
ldChrisldChris
I am trying to use the exact same method but to null the date. I have tried many things:

caseObj.acDate__c = ''

caseObj.acDate__c = null

but Can't get it. Any direction would be greatly appreciated!

Chris
SuperfellSuperfell
use the FieldsToNull array with the name of the field you're trying to null out.