You need to sign in to do that
Don't have an account?
RRojo
fieldsToNull Help in C#
I have a C# application written to fix our salesforce data. I want to set the salutation field to null (if certain conditions are met) and then update the contact but nothing happens.
this is the code I'm using to set it to null (curr is a contact object from a query result).
curr.fieldsToNull = new string[] {"Salutation"};
Am I doing this right??
Message Edited by VDP-SForce Guy on 04-27-2004 09:48 AM
Hi RRojo,
I'm not seeing any problems, this is how I do it.
String[] ftn = new String[] {"MobilePhone", "HomePhone", "work_Phone__c"};
contact.Id = "003300000037pzP";
contact.fieldsToNull = ftn;
sforce.SaveResult[] srs = binding.update(new sforce.sObject[] {contact});
for (int i=0;i<srs.Length;i++)
{
if (srs[i].success)
{
System.Windows.Forms.MessageBox.Show("Successfully updated contact.");
}
else
{
System.Windows.Forms.MessageBox.Show("Error - " + srs[i].errors[0].message);
}
}
Cheers
Simon