如何使用Beatbox或simple-salesforce在Salesforce中创建自定义表格? [英] How to create a custom table in Salesforce using Beatbox or simple-salesforce?

查看:142
本文介绍了如何使用Beatbox或simple-salesforce在Salesforce中创建自定义表格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们目前正在评估Salesforce的Python绑定-尤其是Beatbox和simple-salesforce.在这两个模块中,via都缺少创建新的自定义表,删除自定义表和删除自定义表的所有项的功能(不使用单个删除).

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).

我们当然可以通过Web在Salesforce中创建和建模自己的自定义表,但是出于自动化和可测试性的考虑,我们宁愿创建自己的自定义表 使用Python自动创建表格...关于此问题和批量删除问题的任何指针?

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 issue and the mass deletion issue?

推荐答案

不幸的是,Beatbox和Simple-Salesforce并非设计用于创建或删除自定义对象(表).

Unfortunately, Beatbox and Simple-Salesforce are not designed for the creation or deletion of custom objects (tables).

Beatbox(SOAP API)和Simple-Salesforce(REST API)的创建是为了与Salesforce SOAP和REST API一起使用以访问Salesforce数据.这样,您可以创建,更新或删除现有对象的记录,并查询那些对象(表)的记录.

Beatbox (SOAP API) and Simple-Salesforce(REST API) were created to work with the Salesforce SOAP and REST APIs to access Salesforce data. This allows you to create, update, or delete records of existing objects and query records of those objects (tables).

如果您要以编程方式创建新的自定义对象,则可以通过元数据API(

If you want to create new custom objects programmatically, that is do able through the Metadata API (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/). However, I have no yet found a tool as user friendly as Simple-Salesforce for creating Metadata deployments. The metadata, in general, is less friendly because you have to push the whole metadata package as a zip file. It is more cumbersome than simple querying or record creation.

对于批量删除,我没有很好的解决方案.单独执行它们的问题是否很慢,或者实例中使用了太多的API调用? 一种可能的解决方案是拥有一个或所有执行所有删除操作的Apex类.然后创建一个具有多个复选框的自定义对象.设置触发器,以在更新该对象的记录并填充复选框为true时调用Apex删除类.然后,您可以从Python调用对象更新,这将触发批量删除.它很hacky,但是可以用.

I don't have a good solution for the mass delete. Is the issue that doing them individually is slow or uses up too many API calls in your instance? One possible solution is to have a an Apex Class or classes that that does all of the deletes. Then create a custom object that has a number of checkboxes. Set up a trigger to call the Apex Delete Classes when a record of the that object is updated and the checkboxes are populated true. Then you can call an object update from Python that will trigger mass deletes. It is hacky, but it works.

这篇关于如何使用Beatbox或simple-salesforce在Salesforce中创建自定义表格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆