beatbox

Beatbox: How do I add OR function to WHERE clause when pulling data from SFDC?

爱⌒轻易说出口 提交于 2020-01-06 15:18:29
问题 Currently I am querying data from the Account object for only accounts with Opportunities. However, I want to add an OR function so that it will query data for accounts that have Contacts as well. What is the syntax for adding an OR to that? As in (SELECT AccountID FROM Opportunity OR Contact). So if the AccountID is in either set of data, it will pull the website for me. Current State: query_result = svc.query("SELECT ID,Website FROM Account where ID in (SELECT accountId FROM Opportunity)")

How to create a custom table in Salesforce using Beatbox or simple-salesforce?

雨燕双飞 提交于 2020-01-04 07:50:10
问题 We are currently evaluating Python bindings for Salesforce - in particular Beatbox and simple-salesforce. In both modules via are missing functionality to create new custom tables, drop a custom table and dropping all items of a custom tables (without using individual deletes). Of course we can create and model our own custom tables in Salesforce through the web but for the sake of automation and testability we would prefer to create our tables automatically using Python...any pointer on this

beatbox bulk delete: Getting MALFORMED_ID

只愿长相守 提交于 2019-12-25 06:27:17
问题 Just like upsert, I want to bulk delete records of a particular custom index using beatbox. Is there any way? I am getting MALFORMED_ID when i am doing it. 回答1: Delete command in beatbox depends on delete() SOAP API call. It requires to know primary keys Id of deleted objects and there is no possibility to use external ID, because it should be known beforehand exactly what is deleted. (example for Contact object) sql = "SELECT Id FROM Contact WHERE my_external_id__c in ({})".format( ', '.join

beatbox bulk delete: Getting MALFORMED_ID

不想你离开。 提交于 2019-12-25 06:27:06
问题 Just like upsert, I want to bulk delete records of a particular custom index using beatbox. Is there any way? I am getting MALFORMED_ID when i am doing it. 回答1: Delete command in beatbox depends on delete() SOAP API call. It requires to know primary keys Id of deleted objects and there is no possibility to use external ID, because it should be known beforehand exactly what is deleted. (example for Contact object) sql = "SELECT Id FROM Contact WHERE my_external_id__c in ({})".format( ', '.join

How to get files from Salesforce using Python

好久不见. 提交于 2019-12-14 01:18:39
问题 I am using Python/Beatbox to access Salesforce cases. service = beatbox.PythonClient() # instantiate the object service.login(...) # login using your sf credentials query_result = service.query("SELECT Id, AccountId, CaseNumber FROM Case WHERE Id='xyz' ") I'm interested in a specific case: print query_result[0].Id Get attachments... att_result = service.query("SELECT Id, ContentType, Name FROM Attachment WHERE ParentId= '" + str(query_result[0].Id) + "'") So far the results are good. Now I

How to fetch Salesforce Attachment file content with django-salesforce?

ぃ、小莉子 提交于 2019-12-10 11:55:37
问题 I'm developing a Django 1.11 app serving as a UI for some Salesforce Objects using django-salesforce for the communication with Salesforce. I have to give users the option to download files from Salesforce Attachment objects related to their Contact. # Django Attachment model on my_app/models.py ... class Attachment(models.Model): parent = models.ForeignKey(Contact, models.DO_NOTHING, sf_read_only=models.NOT_UPDATEABLE) name = models.CharField(max_length=255, verbose_name='File Name') content

Uploading Attachments to Salesforce API via Beatbox, Python

一曲冷凌霜 提交于 2019-12-01 23:27:50
问题 I'm uploading documents to Salesforce using beatbox and python and the files are attaching correctly but the data contained within the files gets completely corrupted. def Send_File(): import beatbox svc = beatbox.Client() # instantiate the object svc.login(login1, pw1) # login using your sf credentials update_dict = { 'type':'Attachment', 'ParentId': accountid, 'Name': 'untitled.txt', 'body':'/Users/My_Files/untitled.txt', } results2 = svc.create(update_dict) print results2 output is: