I need to add data, specifically a lead, to another organization's Salesforce account. I need to use the SOAP API from an external .NET web application.
In my prototypes I have the Enterprise WSDL in my Visual Studio project and I can successfully add a lead to my organization's Salesforce account, authenticating with my email address and password/security token combination.
However, I need to insert a lead into another organization's Salesforce account. The configuration (email, password, token etc) will be stored in the external .NET application, but the part I am struggling to understand is:
I have the Enterprise WSDL which is strongly typed to my organization's Salesforce account, so I cannot use that to make calls on another organization's Salesforce data, even if I have the credentials, correct?
This is how I am currently adding a lead to our Salesforce account
private SforceService binding;
binding = new SforceService();
binding.Timeout = 10000;
LoginResult lr = null;
bool success = true;
try
{
lr = binding.login("myemailaddress", "mypasswordandtoken");
}
catch (Exception ex)
{
success = false;
}
if(success)
{
// snip, newLead is created here.
SaveResult[] sr = binding.create(new sObject[] { newLead });
}