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
JesseAJesseA 

Using web2Lead from one instance to post lead to another instance

We have a partner which we would like to use web2lead to post a lead to their instance. I was able to setup the http post in apex and create a lead to one of my own sandboxes but when i point it to the partners org then I get this error:

 

System.CalloutException: Unexpected end of file from server

 Any thoughts? I asked them to whitelist all the SFDC IP ranges because I think they are trying to exercise some strict Ip Login security but not sure if that even makes sense. Whitelisting SFDC IP ranges within SFDC. 

Abhay AroraAbhay Arora

Hi,

 

Create a web2lead form from the target Org and replace all values in your web form it should work.

 

Please let me know if you still face issue or mark this as solved

JesseAJesseA

I am still encountering this error. What you said is exactly what we did. The source org just gave me the HTML code that was generated by SFDC. I also tried changing the url to match that of the sandbox server, cs1.