CRM 2016 웹 API를 fetchxml 쿼리 매개 변수와 함께 사용하고 있지만 쿼리가 너무 길어서 IN 연산자에서 전달 된 매개 변수의 수가 300 개 요소이고 일부는 300 개 요소입니다 시대는 그 이상이 될 것입니다.fetchXml 쿼리 유형이 너무 긴 URL 요청 URL
그래서 내 문제는 쿼리가 GET HTTP 요청에 비해 너무 큽니다. http 메시지 본문에서 쿼리를 보내려고했지만 그게 작동하지 않아서이 문제의 해결책은 무엇입니까? 나는이 요청
<fetch mapping="logical" distinct="true">
<entity name="entity">
<attribute name="new_classopportunityid" />
<attribute name="new_trainingproduct" />
<attribute name="new_gtgstatus" />
<attribute name="new_scheduledstartdate" />
<attribute name="new_scheduledenddate" />
<attribute name="new_remainingnumberofseats" />
<attribute name="new_liveclassroom" />
<attribute name="new_maxlive" />
<attribute name="new_xavieruniversity" />
<attribute name="new_partnerlive" />
<attribute name="new_blended" />
<filter>
<condition attribute="new_classopportunityid" operator="in">
<value>001943ea-e263-e611-8158-00155d002810</value>
<value>0071e4ea-bd9b-e611-8163-00155d002810</value>
<value>00c32774-1c8f-e611-8161-00155d002810</value>
<value>00d513fa-f0bb-e611-8169-00155d002810</value>
<value>....</value>
<value>....</value>
<value>....</value>
</condition>
</filter>
</entity>
</fetch>
CRM을 웹 API 엔드 포인트 :
GET http://<org>/api/data/v8.0/<entity>?fetchXml=<fetch mapping="logical" distinct="true">
<entity name="entity">
<attribute name="new_classopportunityid" />
<attribute name="new_trainingproduct" />
<attribute name="new_gtgstatus" />
<attribute name="new_scheduledstartdate" />
<attribute name="new_scheduledenddate" />
<attribute name="new_remainingnumberofseats" />
<attribute name="new_liveclassroom" />
<attribute name="new_maxlive" />
<attribute name="new_xavieruniversity" />
<attribute name="new_partnerlive" />
<attribute name="new_blended" />
<filter>
<condition attribute="new_classopportunityid" operator="in">
<value>001943ea-e263-e611-8158-00155d002810</value>
<value>0071e4ea-bd9b-e611-8163-00155d002810</value>
<value>00c32774-1c8f-e611-8161-00155d002810</value>
<value>00d513fa-f0bb-e611-8169-00155d002810</value>
<value>....</value>
<value>....</value>
<value>....</value>
</condition>
</filter>
</entity>
</fetch>
이 내가 API에서 가져온 응답입니다
여기 내가 사용하는 fetchxml 쿼리의 코드입니다.
Error code: 414: HTTP/1.1 414 Request-URI Too Long Response : "<!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.01\/\/EN\"\"http:\/\/www.w3.org\/TR\/html4\/strict.dtd\">\r\n<HTML><HEAD><TITLE>Request URL Too Long<\/TITLE>\r\n<META HTTP-EQUIV=\"Content-Type\" Content=\"text\/html; charset=us-ascii\"><\/HEAD>\r\n<BODY><h2>Request URL Too Long<\/h2>\r\n<hr><p>HTTP Error 414. The request URL is too long.<\/p>\r\n<\/BODY><\/HTML>\r\n" [] []
엔티티 엔드 포인트에서 post를 사용하려고 시도했지만 이것이 REST이며 엔티티를 생성하지 않는 엔티티를 생성한다는 것을 의미하므로 전송 한 URL을 검사합니다. 감사합니다 –
예! 방금 어제도 보았고 내 대답에 대한 후속 조치로 게시하려고했습니다. 좋은 발견. –
감사합니다. –