You need to sign in to do that
Don't have an account?
alex.gan1.3933003770315437E12
can't update a checkbox field via SOAP API
I can't update a checkbox field(no error,but the checkbox field doesn't updated),code like this:
Account[] a= new Account[0];
a[0].Id = customer.Id;
a[0].Name = customer.Name;//textbox field is OK
a[0].Anyue_Membership__c = true;//checkbox field not be updated
LimitInfo[] li;
SaveResult[] sr;
try
{
DebuggingInfo di = client.update(header, null, null, null, null, null, null, null, null, null, null, a, out li, out sr);
}
catch (Exception ex)
{
throw (ex);
}
if (sr[0].success == false)
{
foreach (Error error in sr[0].errors)
{
returnValue += "errormessage:" + error.statusCode + error.message + "\t";
}
}
return returnValue;
could anybody help me?
Account[] a= new Account[0];
a[0].Id = customer.Id;
a[0].Name = customer.Name;//textbox field is OK
a[0].Anyue_Membership__c = true;//checkbox field not be updated
LimitInfo[] li;
SaveResult[] sr;
try
{
DebuggingInfo di = client.update(header, null, null, null, null, null, null, null, null, null, null, a, out li, out sr);
}
catch (Exception ex)
{
throw (ex);
}
if (sr[0].success == false)
{
foreach (Error error in sr[0].errors)
{
returnValue += "errormessage:" + error.statusCode + error.message + "\t";
}
}
return returnValue;
could anybody help me?
Thanks
All Answers
try
{
DebuggingInfo di = client.update(header, null, null, null, null, null, null, null, null, null, null, a, out li, out sr);
}
and Now I knew the reson why I can't update a checkbox field, I have to set it twice,like this:
a[0].Anyue_Membership__c = true;
a[0].Anyue_Membership__cSpecified= true;
Now I got a new question, I can update a checkbox field to "checked",but I can't update it to "unchecked" it,even I set them to false,like this:
a[0].Anyue_Membership__c = false;
a[0].Anyue_Membership__cSpecified= false;
I don't know why,could anybody help me?
Thanx!
Thanks
DebuggingInfo di = client.update(header, null, null, null, null, null, null, null, null, null, null, a, out li, out sr);