You need to sign in to do that
Don't have an account?
SQureshi
How to Insert Contact to Salesforce from ASP .NET Page
I want to insert contact to salesforce, I'm using developer.force account. How can I insert contact? I can't use upsert() method because I"m unable to specify External Id field. Can I create External Id field for connected application using developer account?
Contact con = new Contact();
con.FirstName = "********";
con.LastName = "********";
con.AccountId = "********";
con.Phone = "********";
con.Email = "********@gmail.com";
SaveResult[] sr = binding.create(new sObject[] { con });
foreach (SaveResult s in sr)
{
if (s.success)
{
Console.WriteLine("Successfully created Lead with ID: {0}", s.id);
}
else
{
Console.WriteLine("Error creating Lead: {0}", s.errors[0].message);
}
}