simple-salesforce

Saleforce retrieving fields from two different objects - (SOQL) Simple Salesforce Python

泪湿孤枕 提交于 2021-01-29 06:51:00
问题 I am using simpleSalesforce library for python to query SalesForce. I am looking at two different object in SalesForce: Account and Backend (parent-child). The Id in account matches the records of Backend through acc_id I am trying to do this: sf.query_all("SELECT AccEmail__c, (select custid from Backend__c) from Account where Id in (select acc_id from Backend__c where custid LIKE '%CUST%')") But I get the response showing: Malformed request - didn't understand the relationship - in FROM part

Q: Simple-Salesforce make a dynamic soql query

雨燕双飞 提交于 2020-06-23 03:57:14
问题 Was trying to figure out a way to get simple salesforce to just give me all the field names in a list. I want to create soql query that pretty much does the same thing as a Select * does in sql. for obj in objects: fields = [x["name"] for x in sf[obj].describe()["fields"]] thanks 回答1: A list of field names in an object can be achieved as follow: def getObjectFields(obj): fields = getattr(sf,obj).describe()['fields'] flist = [i['name'] for i in fields] return flist getObjectFields('Contact')

Q: Simple-Salesforce make a dynamic soql query

送分小仙女□ 提交于 2020-06-23 03:55:29
问题 Was trying to figure out a way to get simple salesforce to just give me all the field names in a list. I want to create soql query that pretty much does the same thing as a Select * does in sql. for obj in objects: fields = [x["name"] for x in sf[obj].describe()["fields"]] thanks 回答1: A list of field names in an object can be achieved as follow: def getObjectFields(obj): fields = getattr(sf,obj).describe()['fields'] flist = [i['name'] for i in fields] return flist getObjectFields('Contact')

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