sf_open()

Description:
 
Connect to Salesforce cloud server through the way of rest api.

Syntax:
  sf_open(jsonFile)

Note:

The external library connects to Salesforce cloud server. It requires putting configuration file user.json in the directory storing SalesforceCli external library. Below is the content of user.json:
{

  "LOGINURL" : "https://login.salesforce.com",

  "GRANTTYPE" : "/services/oauth2/token?grant_type=password",

  "CLIENTID" : "3MVG9fe4g9fhX0E66lsoDv6kDPNDZPhVxCzgBevUKrHAmXTX",

  "CLIENTSECRET" : "4D3DBDFD2E7F7B169EC6DD6BFAF5CAAB3C219D6226",

  "USERID" : "userName",

  "PASSWORD" : "userPassword",

  "ACCESSTOKEN" : "access_token",

  "INSTANCEURL" : "instance_url"

}
Generally, users just need to modify values of
CLIENTID, CLIENTSECRET, USERID and PASSWORD. Note that the key value should be in uppercase.

Parameter:

jsonFile

The JSON file name; by default call user.json in the directory containing SalesforcCli external library

Return value:
Connection object

Example:

 

A

 

1

=sf_open()

Connection using default configurations

2

=sf_open("C:/user.json")

Connection using a specified JSON file