Accessing Company Data from Salesforce
I would like to receive company information from salesforece crm. I tried it with the beatbox package. Code
import beatbox
sf_username = "myusername"
sf_password = "mypassword"
sf_api_token = "mytoken"
def get_lead_records_by_email():
sf_client = beatbox.PythonClient()
password = str("%s%s" % (mypassword, mytoken))
sf_client.login(sf_username, password)
lead_qry = "SELECT City,State,Street,NumberOfEmployees,CompanyId FROM DatacloudCompany WHERE DunsNumber = '008528283'"
records = sf_client.query(lead_qry)
return records
print get_lead_records_by_email()
But I am getting the following error. beatbox._beatbox.SoapFaultError: 'INVALID_TYPE' "INVALID_TYPE: sObject type 'DatacloudCompany' is not supported."
Is there something I am doing wrong?
I saw a couple of other packages like the simple Salesforce command and pyforce. Will beatbox be the best one to use or should I choose some other package?
Any help in the right direction would be appreciated. Thanks in advance.
+3
source to share