Basically I need to create a web application that contains a web to lead form. Upon submission of the Lead, I need to get the record ID and details of that Lead in my web application, which is obviously external to Salesforce.com. Any thoughts how I can go about doing this? Thanks!
Best Answer
Config solutions
You could define a workflow rule?
Coding solutions - SF as the actor
@future
in the "after insert" trigger on Lead.Coding solutions - your page as the actor
All above are asynchronous, you don't wait for the answer, you get the message / email some time later. Means you'd have to store "unmatched leads" somewhere.
If that's unacceptable - you could ditch the web2lead process and create your own integration (via SOAP or REST), there are high chances you'll find something for yourself at http://wiki.developerforce.com/page/Data_Integration. Basically the
create()
call would return to you with either the error or lead's Id...Or just ask by sending a query ;) Or being notified via Streaming API ;) Plenty of options really.