You need to sign in to do that
Don't have an account?

InvalidJob:Operation cannot be specified
I am trying to use the bulk data api and keep getting a AsyncApiException kicked back with the excpetion code being Invalid Job and the exceptionMessage = 'Operation cannot be specified'. What does that even mean? I have tried this code with upsert/delete/insert/query/update. I even commented out the ExternalIdFieldName setting when it wasn't an update or insert with no luck. Any help would be much appreciated. Here is the code...
String url = "https://" + conn.getServer() + ".salesforce.com/services/async/22.0/job"; ConnectorConfig config = new ConnectorConfig(); config.setSessionId(sesId); config.setRestEndpoint(url); config.setTraceMessage(true); BulkConnection bc = new BulkConnection(config); JobInfo job = new JobInfo(); job.setObject(table); job.setExternalIdFieldName(extId); job.setOperation(OperationEnum.upsert); job.setContentType(ContentType.CSV); job = bc.createJob(job); System.out.println(job);
Changed the first line to...
String url = "https://" + conn.getServer() + ".salesforce.com/services/async/23.0";
Problem solved