You need to sign in to do that
Don't have an account?
Cable Guy.ax375
Set Date Field to Null
I have a java application and I try to set the date field in salesforce.com to null.
java.util.Date litDate = null;
updateBuilding.setLit_Date__c(litDate);
It doesn't work. How will I be able to achieve the goal? Any code samples?
Thanks in advance.
Hi Simon,
I am working on creating a button in SF that will updates a series of fields to Null. I understand from your posts that the right methoed is to use fieldsToNull. I just can't seem to find any Java code samples that shows how to use this. Can you help with that?
I can get the following working in Java but I can't reset the Data field. I belive the right solution is to instead use fieldsToNull. What would I need to change?
Regards,
Morten
My code looks like this:
fieldsToNull = array("Installation_Date__c");
{!REQUIRESCRIPT("/soap/ajax/9.0/connection.js")}
var contact = new sforce.SObject("Contact");
contact.id = "{!Contact.Id}";
contact.PO_Number__c=" ";
contact.Installation_Date__c=" "
var result = sforce.connection.update([contact]);
if (result[0].getBoolean("success"))
{
// Refresh window
window.location.reload();
}
else
{
alert("Error saving contact");
}