I am new to accessing Salesforce data via the API. I am using the beatbox library for Python.
import beatbox sf = beatbox.PythonClient() sf.login('my user name', 'my password + security token') a = sf.describeSObjects('account') account = a accountFields = account.fields for i in accountFields: print i
This gives me a nice list of the fields in Account object. I cannot figure out how to look up the data type for each field, however. I've tried many different iterations based on the examples in the Salesforce API documentation, but not having any luck.
For example, in this code:
for i in accountFields: print i.type
my iterations result in the Python string representation of the field, as opposed to Field object of the describeSObjectresult.