我正在尝试使用简单的 salesforce 更新 salesforce 中的案例所有者。但是当我尝试更改案例所有者时,它没有被分配,并且案例进入分配错误队列。
我的Python代码是:
headers = {'Sforce-Auto-Assign': 'False'}
sf.Case.update("500V*******",{"OwnerId":"005***********"},headers)
我希望使用给定的所有者 ID 更新案例所有者,我是否必须包含更多字段或标题?
最佳答案
我使用 python Beatbox 解决了这个问题。
为 python 3.X 安装 beabox :
pip install -e git+ https://github.com/superfell/Beatbox@master#egg=beatbox
代码:
导入beatbox
sf_username = "用户名"
sf_password = "密码"
sf_api_token =“ token ”
sf_client =beatbox.Client()
sf_client.serverUrl = 'https://test.salesforce.com/services/Soap/u/20.0 '
密码 = str("%s%s"% (sf_password, sf_api_token))
sf_client.login(sf_用户名,密码)
object_dict = {'OwnerID': 'ownerid','type':'Case','Id': 'caseid'}
结果 = sf_client.update(object_dict)
结果
使用这个我能够成功更新案例所有者。
关于python - 使用 Python 更新销售人员的案例所有者,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57782676/