[英]Dynamics Xrm Web API upsert operation
I have created a PCF application and using the Xrm WebAPI library to perform CRUD operations and associations as shown here https://docs.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/reference/xrm-webapi/online/execute我创建了一个 PCF 应用程序并使用 Xrm WebAPI 库来执行 CRUD 操作和关联,如此处所示https://docs.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/reference /xrm-webapi/在线/执行
In one of the operations, I am checking if a record exists.在其中一项操作中,我正在检查是否存在记录。 If not, it is created, else updated.如果没有,则创建它,否则更新。 I am using two calls for this, and was wondering if there is an easier way to perform a single upsert.我为此使用了两个调用,并且想知道是否有更简单的方法来执行单个 upsert。
You need to define an alternate key and use the Web API directly (by fetch or jQuery) because Xrm.WebApi doesn't support this kind of operations.您需要定义一个备用键并直接使用 Web API(通过 fetch 或 jQuery),因为 Xrm.WebApi 不支持这种操作。
You can find more information here: https://docs.microsoft.com/en-us/power-apps/developer/data-platform/use-upsert-insert-update-record?tabs=webapi您可以在此处找到更多信息: https://docs.microsoft.com/en-us/power-apps/developer/data-platform/use-upsert-insert-update-record?tabs=webapi
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.