+ Start a Discussion
PSG_mumbaiPSG_mumbai 

Web 2 Anything Feature

Hello all, I am new to apex programming. I am trying to capture information from web form / html and save it to SF object as a new record

1. Create form to be embedded on the customers website. form POST to a SFDC Site. 
2. Create a site on SFDC. This site will receive the request, process it and create the record of the object.
3. Redirect user to the appropriate page.
Please help me with some example code.
Thanks!
tomcollinstomcollins

It's not going to be that simple.  Check out the chapters on Exposing Apex Methods/Classes as SOAP/REST Web Services in the Apex Code Developer's Guide.

 

You'll be better off hosting the form on SFDC.  If the form is on the customer website, a CGI script on that site will need to process it and either make a SOAP call to SFDC, or make a REST call that includes OAuth 2.0 authentication.

 

Not pretty.