You need to sign in to do that
Don't have an account?
Stephen Loughin
salesforce_bulk insert fails but bulk query succeeds?
I can read using bulk.create_query_job, but I can't write back to Product2 with bulk.create_insert_job
The object I'm passing is 'Product2' and I can use the same SalesforceBulk object to successfully perform a bulk query on Product2 using bulk.create_query_job. This code fails on create_insert_job with the following response:
[400] Bulk API HTTP Error: InvalidJob - No create access for object:Product2
Is this a permissions issue? I am using an admin account.
bulk = SalesforceBulk(sessionId=self.access_token, host=urlparse(self.instance_url).hostname) job = bulk.create_insert_job(object, contentType='CSV') # fails on this line reader = csv.DictReader(open(csv_file)) items = [] for row in reader: items.append(row) csv_iter = CsvDictsAdapter(iter(items)) batch = bulk.post_bulk_batch(job, csv_iter) bulk.wait_for_batch(job, batch) bulk.close_job(job)
The object I'm passing is 'Product2' and I can use the same SalesforceBulk object to successfully perform a bulk query on Product2 using bulk.create_query_job. This code fails on create_insert_job with the following response:
[400] Bulk API HTTP Error: InvalidJob - No create access for object:Product2
Is this a permissions issue? I am using an admin account.
Anudeep (Salesforce Developers)
Can you check if the user running this code has access to Product2 using the below SOQL?
Anudeep (Salesforce Developers)
Please use the userId visible in the debug logs