错误:Failed to load resource: the server responded with a status of 400 (Bad Reque

技术文章 2022-04-19 23:48:30 33

摘要

在使用Dynamicscrm365中的webapi的时候遇到过一些错误,下面总结一下错误: 出现错误:Failedtoloadresource:theserverrespondedwithastatusof404(BadRequest) 出现错误:Failedtoloadresource:theserverrespondedwithastatusof500(BadRequest) 出现错误:Failedtoloadr……

在使用Dynamics crm 365中的webapi的时候遇到过一些错误,下面总结一下错误:

出现错误:Failed to load resource: the server responded with a status of 404 (Bad Request)

出现错误:Failed to load resource: the server responded with a status of 500 (Bad Request)

出现错误:Failed to load resource: the server responded with a status of 400 (Bad Request)

出现这些错误一般情况是:

1.路径有问题:在crm的开发过程中,我们经常会用到在js中查询数据, dynamics提供了webapi供我们使用,但在使用的 时候不是直接通过实体名去进行查询的。 实体名以s结尾,如 tb_crms,查询的时候就是tb_crmses,后面加es 以y结尾:tb_crmy---tb_crmies 以es结尾:tb_crmes---tb_crmeses 其他的通通加s;

2.参数类型和参数类型不匹配,比如客户实体string 类型,销售线索是date类型;也有可能是参数类型匹配,但是名称错误:比如两个实体都有年龄,但是字段命名不一致。

3.可能是插件和所写的webapi代码冲突了
————————————————
版权声明:本文为CSDN博主「懒惰的小白码」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_60521457/article/details/119957664

评论(0)
1422369665