• Francis Gerard Alcala
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
Hi,

How can I create a job that retrieves all the Leads records?
I currently have these codes, are these correct?
 
public static void main(String[] args)
      throws AsyncApiException, ConnectionException, IOException {
        BulkExample example = new BulkExample();
        // Replace arguments below with your credentials and test file name
        // The first parameter indicates that we are loading Account records
//        example.runSample("Account", "myUser@myOrg.com", "myPassword", "mySampleData.csv");
        example.runSample("Lead", "email@myemail.com", "password", "mySampleData.csv");
    }

private JobInfo createJob(String sobjectType, BulkConnection connection)
          throws AsyncApiException {
        JobInfo job = new JobInfo();
        job.setObject(sobjectType);
//        job.setOperation(OperationEnum.insert);
        job.setOperation(OperationEnum.query);
        job.setContentType(ContentType.CSV);
        job = connection.createJob(job);
        System.out.println(job);
        return job;
    }

Also, what should be the content of my csv file?
 
hi ,
i have crate the jar file from wsdlc get the error "Exception in thread "main" java.lang.NoClassDefFoundError: org/stringtemplate/v4
/STGroupDir"
I need help specifying the proxy in the code below.

var _this = this;
  this.sfConn = new sf.Connection({
    loginUrl: 'https://login.salesforce.com'
  });
  console.log('About to log into salesforce');
  this.sfConn.login(username, password, function(error, userInfo) {
    if (error) { return console.log(error); }
    _this.userInfo = userInfo;
    callback(error, userInfo);
  });