今天介绍一下如果创建Custom API,我们首先需要知道它和action有什么区别,什么时候使用Custom API或者Action?
- Custom API和Action的区别
Create your own messages (Microsoft Dataverse) - Power Apps | Microsoft Learn
- 什么时候使用Custom API或者Action?
Custom API与Action在参数较少的情况下,性能类似,但随着参数的增加,action的性能会开始下降。并且Custom API相较于Action更易于维护,比如在参数维护这块。对于新开发的API,只要不是有特殊需求的,我们都可以使用Custom API;对于老的action,我们可以根据它目前的性能来决定是否转成Custom API。
如果需要将Action转成Custom API的话,可以使用XrmToolBox里的Custom Action to Custom API Converter工具。
我们使用Power Apps创建一个custom api需要通常需要创建创建三条记录在解决方案中:自定义 API, 自定义API请求参数,自定义API响应参数