Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用合作伙伴 SOAP API 将数据插入到 salesforce org,但由于对象上的验证和触发器,一些数据没有被插入
如何在插入数据之前禁用验证和触发器?
我想通过 salesforce SOAP API 以编程方式进行
提前致谢
我不相信您可以以编程方式禁用它们(设置为非活动状态)。
但是,您可以将自定义设置用作开关,这可以从 apex 访问。但这需要您在所有验证规则和触发器中添加它。
所以你的验证规则和触发器会像
如果 switch 为真 ---> 做事
以及当您想要运行不应触发验证规则和触发器的代码时
> set switch to false -----> do stuff > set switch to true