我有以下代码来插入一条记录(我将插入 1000 条)。我获得了成功的插入,但所有数字字段在 salesforce 中都是空的。一个文本字段可以正常工作(“Church of Randy”)并出现在 salesforce 中。有什么想法我可能做错了吗?
public void InsertTestRecord()
{
ChurchHist__c ch = new ChurchHist__c();
ch.ChurchId__c = 9999;
ch.ChurchName__c = "Church of Randy";
ch.ReportYear__c = 2013;
ch.ReportMonth__c = 08;
ch.RegisteredMembers__c = 777;
ch.ActiveMembers__c = 111;
ch.InactiveMembers__c = 666;
ch.UsersForMonth__c = 25;
ch.ContribForMonth__c = 789.01;
ch.ContribYTD__c = 200000.02;
ch.AchContrib__c = 200000.00;
ch.CcContrib__c = 0.02;
ch.AchToCc__c = 0.12345;
sObject[] s = new sObject[1];
s[0] = ch;
try
{
SaveResult[] saveResult = binding.create(s);
if (saveResult[0].success)
{
Debug.Print("Success");
}
else
{
foreach (Error error in saveResult[0].errors)
{
Debug.Print(error.statusCode.ToString());
Debug.Print(error.message);
}
}
}
catch (SoapException se)
{
Debug.Print(se.ToString());
}
}