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
GlyphGlyph 

Web Form to Lead (Account, Opportunity, Case, etc...)

I am new to SalesForce.com...  I am trying to create some web forms that will call some server side Java code to parse the forms and create various records in my SalesForce.com account.

After reading through many threads and the PDF's, I am still a bit lost.


Can anyone layout the basics of how to accomplish the following:

  • From within Java, Connect to SalesForce, Create a Lead
  • From within Java, Connect to SalesForce, Create a Contact
  • From within Java, Connect to SalesForce, Create an Account
  • From within Java, Connect to SalesForce, Create a Case

  • From within Java, Connect to SalesForce, Create a Lead, Then convert said lead into an account and opportunity
I am assuming the first 4 are very simple to do and similar... the last one may be tricky but I am sure its been done before and there is a good pattern to follow.

Again sorry if this is basic stuff... and if there is a good explaination somehwere i can read.. please point me to it.. i have not yet found it.


Thanks


werewolfwerewolf
These are indeed pretty simple to do.  Have a look at the Java Quick Start for some good sample code:

http://wiki.apexdevnet.com/index.php/Web_Services_API#Java
david masonisdavid masonis
Hi!!
 
***I donwnload quickstart.zip, and i modified code on quickstart.java to change the "query" on the 2nd option ("2. Get Accounts"). But when I put some query, for example this-->  SELECT Name, (SELECT LastName FROM Contacts) FROM Account ;
the query retorned the Name from Account, but LastName from Contacts is Null.
 
**** If I use this query -->

"select AccountId, ClosedDate, Description, Account.name, Account.NumberOfEmployees, Account.industry from Case c"

the problem is the next:

com.sforce.soap.enterprise.sobject._case cannot be cast to com.sforce.soap.enterprise.sobject.Account

 

What Happen?? Do not I have permissions for other tables that are not the Account???

 

Thank you in advance!!!

 

SuperfellSuperfell
the quickstart treats the query results as accounts, because thats what the original quickstart query returned, if you changed it to cases, you need to change the rest of the code to be cases as well.
ThebannerkidThebannerkid
Hi,

I have a satisfaction custom object that i am currently setting up for my company. Have a form on my companies website that i want to be filled out and to automatically be entered into salesforce.com custom object... can this be done and what is the best way of doing it?

Cheers Richard.
Rick.BanisterRick.Banister
Is this something that you have been told you have to do yourself by writing programs, or are you allowed to look at vendor solutions?