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

update API call Issue


I am trying to update an Opportunity record.  The call returns TRUE with the correct ID value, but the column being updated still has a null value. 

Any ideas ???


private bool UpdateOppAutoEmailDate(string oppId)


sforce.Opportunity updOPP = new sforce.Opportunity();

sforce.GetServerTimestampResult timestamp = Globals.binding.getServerTimestamp();

updOPP.Auto_Email__c = timestamp.timestamp;

updOPP.Id = oppId;

sforce.sObject[] record = new sforce.sObject[] {updOPP};

sforce.SaveResult[] saveResults = Globals.binding.update(record);

txtDebug.Text += "Update: " + saveResults[0].success + " : " + saveResults[0].id + " : " + "OPPID: " + oppId;

return saveResults[0].success;



The problems appears to be with fields that are type DateTime.  I have no problem updating STRING fields. 



While you waiting for a real expert to answer your question, i'll give it a whirl

I was having the same problem last week with a new Custom field we created.
I noticed that another version of this existed followed by 'specified', and untill i set that to true, the field wouldn't update.
This was a Double field and not a DateTime field.

So if my field was called MyCustomField__c, there was another attribute called MyCustomField__cSpecified.
Only after i set that to true, did it update MyCustomField__c with the value i was setting.

So check if that attribute maybe exists.
Hope that can help

Message Edited by GrantM on 08-08-2005 03:52 AM



Much thanks... your suggestion solved my problem.

Thanks again !!!

PS: This should be documented in the API manual.  If it is, please let me know.