zoukankan      html  css  js  c++  java
  • 在Salesforce中向外公布Service去创建Lead,并且用Asp.Net去调用此Service

    1):在Salesforce中如何配置,向外公布此Service,请看如下链接:

       http://www.shellblack.com/marketing/web-to-lead/ 

    2):如何在Asp.Net中调用此Service去创建对应的Lead,请看如下代码:

                try
                {
                    StringBuilder data = new StringBuilder();
                    data.Append("oid=[youroid]");
                    data.Append("&first_name=" + Server.UrlEncode(this.txtFirstName.Text));
                    data.Append("&last_name=" + Server.UrlEncode(this.txtLastName.Text));
                    data.Append("&email=" + Server.UrlEncode(this.txtEmail.Text));
    
                    string url = "https://test.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8";
                    HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
                    req.Method = "POST";
                    req.ContentType = "application/x-www-form-urlencoded";
                    byte[] buffer = Encoding.UTF8.GetBytes(data.ToString());
                    req.ContentLength = buffer.Length;
                    using (Stream reqst = req.GetRequestStream())
                    {
                        reqst.Write(buffer, 0, buffer.Length);
                    }
    
                    WebResponse response = req.GetResponse();
                }
                catch (Exception ex)
                {
    
                }

    更多信息也可以看如下链接: https://success.salesforce.com/ideaView?id=08730000000Y07QAAS 

    3): http://www.chronoengine.com/faqs/61-cfv4/cfv4-tutorials/4112-how-can-i-send-form-data-to-salesforce.html 

  • 相关阅读:
    《秒杀系统架构分析与实战 》
    《豆瓣的基础架构》
    转--《亿级用户下的新浪微博平台架构 》
    转-《蚂蚁金服11.11:支付宝和蚂蚁花呗的技术架构及实践 》
    hdu2029
    hdu2027
    hdu2026(water~~)
    PHP电影小爬虫(2)
    今天来做一个PHP电影小爬虫。
    PHP Simple HTML DOM解析器
  • 原文地址:https://www.cnblogs.com/mingmingruyuedlut/p/4097341.html
Copyright © 2011-2022 走看看