如何在salesforce中通过forcetk插入潜在客户

时间:2015-04-20 06:46:38

标签: javascript salesforce

从salesforce获取数据。以下函数从salesforce获取当前登录用户的数据。

function init() {
  // Get an instance of the REST API client and set the session ID
  var client = new forcetk.Client();
  client.setSessionToken(getValueFromCookie("sid"));
  // Retrieve the data representing the current user
  client.currentUser(function(response){
    var user = response;
    console.log(user);
    // Find cases that belong to the current user
    client.query("SELECT Name FROM User", function(response){
        console.log(response);
        Tinycon.setBubble(response.totalSize);
    });         
  });
}

现在我想在当前用户中通过forcetk在salesforce中插入一个潜在客户,该用户已登录。

0 个答案:

没有答案