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
sforceincanadasforceincanada 

Newbie question regarding leads and accounts

Hi,

I want to create a form on my website using C#.

  1. After the user submits the form I want to use the API to check if a contact exists using that email address. 

  2. If the contact exists I want to update the contact.

  3. If the contact does not exist I want to check if a lead exists for the email address.

  4. If a lead exists I want to update the lead.

  5. If the lead does not exist I want to insert a lead.

Is this possible to do using the API?

Any code samples in C# of people using the API on websites would be greatly appreciated.

GlennWGlennW

Yup.....  You should use the v2.5 of the API as it makes quieries on items such as email very simple.  If you would like some VB samples just email me (glenn.wilson@quotegen.com) and I'll send you a few functions that I use to search and update sf objects.

There are some great C# and VB samples available on this site that you should also check out.  They show the basics of finding and updating objects.

Cheers;

GlennW

sftestsftest

Hi,

I am currently on the same situation. Trying to insert Lead into salesforce.com from a XML file.

Were you able to insert the data? Can you send me the code snippet if or a psuedo code?

I am not a expert .NET programmer but understand little bit to do some proto type :-)

Thanks for the help.