Z tym przewodnikiem: https://msdn.microsoft.com/en-us/library/mt607719.aspx, próbuję utworzyć żądanie wsadowe, aby usunąć wszystkie cytowane informacje o ofercie. używam Ajax jQuery, aby wykonać zapytanie:CRM WebApi batch request
$.ajax(
{
method: 'POST',
url: 'http://crm/api/data/v8.0/$batch',
headers: {
'Content-Type': 'multipart/mixed;boundary=batch_' + batchId,
'Accept': 'application/json'
},
data: payload
});
I to jest ładowność:
–batch_SuL11egVC7
Content-Type:multipart/mixed;boundary=changeset_Sj74vxbGYr
–changeset_Sj74vxbGYr
Content-Type:application/http
Content-Transfer-Encoding:binary
Content-ID:1
DELETE crm/.../quotedetails(cc9b9ba8-4570-e611-80ba-0050568a6c2d) HTTP/1.1
Content-Type: application/json;type=entry
–changeset_Sj74vxbGYr
Content-Type:application/http
Content-Transfer-Encoding:binary
Content-ID:2
DELETE crm/.../quotedetails(cd9b9ba8-4570-e611-80ba-0050568a6c2d) HTTP/1.1
Content-Type: application/json;type=entry
–changeset_Sj74vxbGYr--
-batch_SuL11egVC7--
nie otrzymuję błąd, ale quotedetails nie zostaną usunięte. To jest odpowiedź:
--batchresponse_a3304387-0e91-4097-b9f8-a207da3aa845--
Ja również znaleźć ten przykład i próbuję replikować go Listonosz: Batch request - Dynamics CRM
Nagłówki:
Content-Type:multipart/mixed;boundary=batch_123456
Accept:application/json
Odata-MaxVersion:4.0
Odata-Version:4.0
ciała:
–-batch_123456
Content-Type:multipart/mixed;boundary=changeset_123457
–-changeset_123457
Content-Type:application/http
Content-Transfer-Encoding:binary
Content-ID:1
POST http://onpremisesurl/api/data/v8.0/accounts HTTP/1.1
Content-Type:application/json;type=entry
{name: 'batch acount 1'}
–-changeset_123457
Content-Type:application/http
Content-Transfer-Encoding:binary
Content-ID:2
POST http://onpremisesurl/api/data/v8.0/accounts HTTP/1.1
Content-Type:application/json;type=entry
{name: 'batch acount 2'}
–-changeset_123457--
--batch_123456--
Pierwsza nie kasuje kont, a druga nie nie tworzyć kont.
Jakieś wskazówki na temat tego, co robię źle?