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
SR1995SR1995 

Using API call "create" is not saving non string variables ints and doubles.

The code sample below (from http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_create.htm ) works, but if I add the line "account.AnnualRevenue = 11000.00;" and view the newly created account in SalesForce, the name and website appear but the AnnualRevenue, which is a double does not. In testing any string parameter I added to account (like phone) appeared on the Account tab while non strings (like number of employees which is an ) did not.  
private void createAccount()
{
   //Create an account object to send to the service
   Account account = new Account();

   //Set several properties
   account.Name = "Koka Kola";
   account.Website = "www.kokakola.com";

   // Add the account to an array of SObjects
   sObject[] records = new sObject[] {account};

   // Invoke the create call, passing in the account properties
   // and saving the results in a SaveResult object
   SaveResult[] saveResults = binding.create(records);

   // Access the new ID
   String newID = saveResults[0].id;
}
SuperfellSuperfell
Assuming you're using .NET, you need to set the specified flags, e.g.

account.annualRevenueSpecified = true;
account.annualRevenue = 10;


salesforce intesalesforce inte
Hi simon,
Currently we are integrating our web site with salesforce using apex api and dotnet.
We have been successful in adding opportunities , accounts etc.
But for each record insert it takes 5-6 seconds. So if we want to insert 30 opportunities it takes 2 minutes.
 Is there any way to reduce this data processing time?
 
Amit Lohogaonkar
Varstreet Inc

 
SuperfellSuperfell
start by reading the data loading manifesto

http://blog.sforce.com/sforce/2006/02/data_loading_ma.html