如何通过 API 将自定义字段添加到 SalesForce 中的布局部分

发布于 2024-12-10 20:13:28 字数 356 浏览 0 评论 0原文

我正在创建一个 Java API 集成工具,如果 Lead & 不存在,则在启动时将创建一个新的自定义文件。接触。经过一番搜索后,我找到了如何做到这一点。 现在列表中的下一个是将新创建的字段放入“潜在客户信息”或“联系信息”布局中。

我查看了 元数据 api 文档,但找不到示例,使用 Java 或普通 SOAP 消息。我在网上、大多数论坛和我能找到的示例代码库中进行了搜索,但没有成功。

因此,如果有人能够通过 Java 或 SOAP 提供一个示例,那就太棒了。

I am creating a Java API integration tool, that on start up will create a new custom filed if it doesn't exist for Lead & Contact. After a bit of searching I have found how to do this.
Now the next bit on the list, is to get the newly created field into the "Lead Information" or "Contact Information" layout.

I have looked in the metadata api docs and cannot find an example, either using Java or plain SOAP messages. I have searched online, in most of the forums, and sample code bases I can find, with no success.

So if anyone one is able to supply an example either through Java or SOAP, that would be fantastic.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

空城之時有危險 2024-12-17 20:13:28

您不能只将字段添加到布局中。您必须首先获取现有布局,然后向其中添加字段,然后更新布局。
布局是一个复杂的对象,由代表部分和行等的其他对象组成。
我建议首先通过 SOAP 或元数据 API 检索布局,一旦您查看了结果,您应该会更清楚如何解析它并注入额外的行和字段。

You can't just add a field to a layout. You have to first get the existing layout and then add the field to it and then update the layout.
A layout is a complex object made up of other objects representing the sections and then the rows, etc.
I recommend first retrieving a layout via either the SOAP or Metadata API and once you've looked at the result, it should be clearer on how you can parse it and inject your additional row and field.

橘味果▽酱 2024-12-17 20:13:28

我自己还没有尝试过,但您应该能够使用元数据 API 中的更新 API 调用来做到这一点。有关更多信息:http://www.salesforce.com/us/developer /docs/api_meta/index.htm

I haven't tried myself but you should be able to do that using the Update API call from Metadata API. For more information: http://www.salesforce.com/us/developer/docs/api_meta/index.htm

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文