连接到SF对象以使用beatbox - python获取ForecastingItem对象描述时出错

时间:2014-12-17 05:04:55

标签: python api ubuntu salesforce beatbox

从ubuntu机器我使用beatbox python包连接到SF并获取对象描述 但无法设法访问ForecastingItems对象。 我检查了我的权限以访问该对象,并且我具有管理员的完全访问权限

我正在使用的脚本如下:当我用ForecastingItem更改对象Account时,它会拉出所有对象字段。

#!/usr/bin/python
# coding=utf8

import beatbox
import pprint
import sys
import os
import datetime

sf_service     = beatbox.PythonClient()
sf_service.login('email@hotmail.com', 'password$numbersletter')

desc_obj       = sf_service.describeSObjects('ForecastingItem')
forcat_item    = desc_obj[0]
forItem_fields = forcat_item.fields

for sf_field_key, sf_field_value in forItem_fields.items():
    print sf_field_key

我听说我应该将beatbox升级到版本21之外的东西,以便能够访问ForecastingItem对象,所以我尝试了apt-get update upgrade beatbox,但我仍然收到错误:

Traceback (most recent call last): File "./fields_associated_with_an_object.py", line 14, in <module> desc_obj = sf_service.describeSObjects('ForecastingItem') File "/usr/local/lib/python2.7/dist-packages/beatbox-20.0-py2.7.egg/beatbox/python_client.py", line 131, in describeSObjects res = BaseClient.describeSObjects(self, sObjectTypes) File "/usr/local/lib/python2.7/dist-packages/beatbox-20.0-py2.7.egg/beatbox/_beatbox.py", line 108, in describeSObjects return DescribeSObjectsRequest(self.__serverUrl, self.sessionId, sObjectTypes).post(self.__conn) File "/usr/local/lib/python2.7/dist-packages/beatbox-20.0-py2.7.egg/beatbox/_beatbox.py", line 332, in post raise SoapFaultError(faultCode, faultString) beatbox._beatbox.SoapFaultError: 'INVALID_TYPE' "INVALID_TYPE: sObject type 'ForecastingItem' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names."

提前致谢!

0 个答案:

没有答案