简体   繁体   English

Dynamics Xrm Web API upsert操作

[英]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.

相关问题 在 Dynamics 365 XRM Web API 中创建记录时无法设置多选选项字段 - Cannot set multi-select option field when creating record in Dynamics 365 XRM Web API Dynamics CRM 365 - 无法访问HTML Web资源中的Xrm.Page.entity - Dynamics CRM 365 - Cannot access Xrm.Page.entity in HTML web ressource 如何确定 Dynamics XRM javascript 是从统一接口 (UCI) 还是从旧版 Web 客户端调用? - How to determine if Dynamics XRM javascript is being invoked from the unified interface (UCI) or the legacy web-client? 无法从打开的框架网络资源Dynamics CRM 2011中访问window.parent的Xrm.data.entity对象 - Unable to access window.parent's Xrm.data.entity object from a opened frame web resource Dynamics CRM 2011 如何使用 Xrm Web Api 更新 Microsoft 模型驱动应用程序中的自定义查找字段? - How to update a custom lookup field in a Microsoft Model-driven App using the Xrm Web Api? 如何使用Xrm(Dynamics 365)在主题树中添加新项目 - How to add in the subject tree a new item with Xrm (Dynamics 365) Xrm.Page.getControl() 在 Dynamics 365 Sales Hub 中不起作用 - Xrm.Page.getControl() not working in Dynamics 365 Sales Hub MS Dynamics 365-Iframe-Access Xrm-权限被拒绝 - MS Dynamics 365 - Iframe - Access Xrm - permission denied Dynamics CRM:在Eclipse中使用Xrm.Page库 - Dynamics CRM: using Xrm.Page library in Eclipse 在Dynamics 365 CRM上使用Xrm Object将表单设置为只读 - Set form read only using Xrm Object on Dynamics 365 CRM
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM